From 117100f6f68c60bf7bf227e6835bf1e81ad90525 Mon Sep 17 00:00:00 2001 From: Beto Muniz Date: Mon, 27 Apr 2020 17:07:38 -0300 Subject: [PATCH] Fix typo --- .../src/edit-story/app/font/actions/useLoadFontFiles.js | 4 ++-- assets/src/edit-story/app/font/fontProvider.js | 4 ++-- assets/src/edit-story/components/panels/test/textStyle.js | 2 +- assets/src/edit-story/components/panels/textStyle/font.js | 8 ++++---- .../edit-story/components/panels/textStyle/textStyle.js | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/assets/src/edit-story/app/font/actions/useLoadFontFiles.js b/assets/src/edit-story/app/font/actions/useLoadFontFiles.js index 02e79dbdda14..c5f0c45a6c0d 100644 --- a/assets/src/edit-story/app/font/actions/useLoadFontFiles.js +++ b/assets/src/edit-story/app/font/actions/useLoadFontFiles.js @@ -104,7 +104,7 @@ function useLoadFontFiles({ getFontByName }) { * @param {Array} elements List of elements selected to be processed * @return {Promise} Returns a Promise after process all font with `maybeEnqueueFontStyle` */ - const ensureFontFaceSetIsAvaialble = (aspect, state, elements) => { + const ensureFontFaceSetIsAvailable = (aspect, state, elements) => { const fontFamilies = elements.map((e) => ({ ...e, [aspect]: state[aspect], @@ -116,7 +116,7 @@ function useLoadFontFiles({ getFontByName }) { return { maybeEnqueueFontStyle, - ensureFontFaceSetIsAvaialble, + ensureFontFaceSetIsAvailable, }; } diff --git a/assets/src/edit-story/app/font/fontProvider.js b/assets/src/edit-story/app/font/fontProvider.js index 10422293aca3..334280efd9c1 100644 --- a/assets/src/edit-story/app/font/fontProvider.js +++ b/assets/src/edit-story/app/font/fontProvider.js @@ -107,7 +107,7 @@ function FontProvider({ children }) { const { maybeEnqueueFontStyle, - ensureFontFaceSetIsAvaialble, + ensureFontFaceSetIsAvailable, } = useLoadFontFiles({ getFontByName }); const state = { @@ -118,7 +118,7 @@ function FontProvider({ children }) { getFontByName, getFontBySlug, maybeEnqueueFontStyle, - ensureFontFaceSetIsAvaialble, + ensureFontFaceSetIsAvailable, getFontWeight, getFontFallback, }, diff --git a/assets/src/edit-story/components/panels/test/textStyle.js b/assets/src/edit-story/components/panels/test/textStyle.js index 8e53d2dd6f68..219acf705725 100644 --- a/assets/src/edit-story/components/panels/test/textStyle.js +++ b/assets/src/edit-story/components/panels/test/textStyle.js @@ -45,7 +45,7 @@ function Wrapper({ children }) { value={{ state: { fonts: [{ name: 'ABeeZee', value: 'ABeeZee' }] }, actions: { - ensureFontFaceSetIsAvaialble: () => Promise.resolve(), + ensureFontFaceSetIsAvailable: () => Promise.resolve(), getFontWeight: () => [{ name: 'Normal1', value: '400' }], getFontFallback: () => 'fallback1', }, diff --git a/assets/src/edit-story/components/panels/textStyle/font.js b/assets/src/edit-story/components/panels/textStyle/font.js index 5d1712a2fad9..db824a1dbbc7 100644 --- a/assets/src/edit-story/components/panels/textStyle/font.js +++ b/assets/src/edit-story/components/panels/textStyle/font.js @@ -51,7 +51,7 @@ function FontControls({ selectedElements, pushUpdate }) { const { state: { fonts }, - actions: { ensureFontFaceSetIsAvaialble, getFontWeight, getFontFallback }, + actions: { ensureFontFaceSetIsAvailable, getFontWeight, getFontFallback }, } = useFont(); const fontWeights = useMemo(() => getFontWeight(fontFamily), [ getFontWeight, @@ -74,7 +74,7 @@ function FontControls({ selectedElements, pushUpdate }) { ({ value: weight }) => weight ); - await ensureFontFaceSetIsAvaialble( + await ensureFontFaceSetIsAvailable( 'fontFamily', { fontStyle, @@ -115,7 +115,7 @@ function FontControls({ selectedElements, pushUpdate }) { options={fontWeights} value={fontWeight} onChange={async (value) => { - await ensureFontFaceSetIsAvaialble( + await ensureFontFaceSetIsAvailable( 'fontWeight', { fontStyle, @@ -139,7 +139,7 @@ function FontControls({ selectedElements, pushUpdate }) { flexBasis={58} textCenter onChange={async (value) => { - await ensureFontFaceSetIsAvaialble( + await ensureFontFaceSetIsAvailable( 'fontSize', { fontStyle, diff --git a/assets/src/edit-story/components/panels/textStyle/textStyle.js b/assets/src/edit-story/components/panels/textStyle/textStyle.js index dc96965483ac..b2c2c6b12f12 100644 --- a/assets/src/edit-story/components/panels/textStyle/textStyle.js +++ b/assets/src/edit-story/components/panels/textStyle/textStyle.js @@ -63,7 +63,7 @@ const Space = styled.div` function StylePanel({ selectedElements, pushUpdate }) { const { - actions: { ensureFontFaceSetIsAvaialble }, + actions: { ensureFontFaceSetIsAvailable }, } = useFont(); const textAlign = getCommonValue(selectedElements, 'textAlign'); const letterSpacing = getCommonValue(selectedElements, 'letterSpacing'); @@ -147,7 +147,7 @@ function StylePanel({ selectedElements, pushUpdate }) { iconHeight={10} onChange={async (value) => { const newFontStyle = value ? 'italic' : 'normal'; - await ensureFontFaceSetIsAvaialble( + await ensureFontFaceSetIsAvailable( 'fontStyle', { fontStyle: newFontStyle,