diff --git a/src/components/typography/IOText.tsx b/src/components/typography/IOText.tsx index 965d8668..2b29a58a 100644 --- a/src/components/typography/IOText.tsx +++ b/src/components/typography/IOText.tsx @@ -10,7 +10,6 @@ import { IOColors, useIOExperimentalDesign, useIOTheme } from "../../core"; import { useBoldTextEnabled } from "../../utils/accessibility"; import { IOFontFamily, - IOFontSize, IOFontWeight, makeFontStyleObject } from "../../utils/fonts"; @@ -37,7 +36,7 @@ export type TypographicStyleProps = Omit< * cannot be included in the default StyleProp */ type IOTextBaseProps = { - size?: IOFontSize; + size?: number; weight?: IOFontWeight; color?: IOColors; font?: IOFontFamily; diff --git a/src/utils/fonts.ts b/src/utils/fonts.ts index f4c6c9fd..0b382afa 100644 --- a/src/utils/fonts.ts +++ b/src/utils/fonts.ts @@ -73,7 +73,7 @@ export const fontWeights: Record = { }; type FontStyleObject = { - fontSize: IOFontSize; + fontSize: IOFontSize | number; /* We also accept `string` because Android needs a composed fontFamily name, like `TitilliumSansPro-Regular` */ fontFamily: string | IOFontFamily; @@ -132,7 +132,7 @@ const defaultFontSize: IOFontSize = 16; */ export const makeFontStyleObject = ( - size: IOFontSize = defaultFontSize, + size: number = defaultFontSize, font: IOFontFamily = defaultFont, lineHeight: TextStyle["lineHeight"], weight: IOFontWeight = defaultWeight,