Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
obetomuniz committed Apr 27, 2020
1 parent 468738b commit 117100f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/src/edit-story/app/font/actions/useLoadFontFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -116,7 +116,7 @@ function useLoadFontFiles({ getFontByName }) {

return {
maybeEnqueueFontStyle,
ensureFontFaceSetIsAvaialble,
ensureFontFaceSetIsAvailable,
};
}

Expand Down
4 changes: 2 additions & 2 deletions assets/src/edit-story/app/font/fontProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function FontProvider({ children }) {

const {
maybeEnqueueFontStyle,
ensureFontFaceSetIsAvaialble,
ensureFontFaceSetIsAvailable,
} = useLoadFontFiles({ getFontByName });

const state = {
Expand All @@ -118,7 +118,7 @@ function FontProvider({ children }) {
getFontByName,
getFontBySlug,
maybeEnqueueFontStyle,
ensureFontFaceSetIsAvaialble,
ensureFontFaceSetIsAvailable,
getFontWeight,
getFontFallback,
},
Expand Down
2 changes: 1 addition & 1 deletion assets/src/edit-story/components/panels/test/textStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
8 changes: 4 additions & 4 deletions assets/src/edit-story/components/panels/textStyle/font.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -74,7 +74,7 @@ function FontControls({ selectedElements, pushUpdate }) {
({ value: weight }) => weight
);

await ensureFontFaceSetIsAvaialble(
await ensureFontFaceSetIsAvailable(
'fontFamily',
{
fontStyle,
Expand Down Expand Up @@ -115,7 +115,7 @@ function FontControls({ selectedElements, pushUpdate }) {
options={fontWeights}
value={fontWeight}
onChange={async (value) => {
await ensureFontFaceSetIsAvaialble(
await ensureFontFaceSetIsAvailable(
'fontWeight',
{
fontStyle,
Expand All @@ -139,7 +139,7 @@ function FontControls({ selectedElements, pushUpdate }) {
flexBasis={58}
textCenter
onChange={async (value) => {
await ensureFontFaceSetIsAvaialble(
await ensureFontFaceSetIsAvailable(
'fontSize',
{
fontStyle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 117100f

Please sign in to comment.