diff --git a/{{cookiecutter.project_slug}}/clients/mobile/react-native/src/utils/fonts.ts b/{{cookiecutter.project_slug}}/clients/mobile/react-native/src/utils/fonts.ts index 784881052..d0b80844a 100644 --- a/{{cookiecutter.project_slug}}/clients/mobile/react-native/src/utils/fonts.ts +++ b/{{cookiecutter.project_slug}}/clients/mobile/react-native/src/utils/fonts.ts @@ -14,3 +14,30 @@ export const customFonts = { [`${baseFamily}-MediumItalic` as const]: require(`../../assets/fonts/${baseFamily}-MediumItalic.${fontFormat}`), [`${baseFamily}-Regular` as const]: require(`../../assets/fonts/${baseFamily}-Regular.${fontFormat}`), } + +type FontFamily = keyof typeof customFonts + +export type FontWeightStyle = + | 'light' + | 'italic-light' + | 'regular' + | 'italic' + | 'medium' + | 'italic-medium' + | 'black' + | 'italic-black' + | 'bold' + | 'italic-bold' + +export const fontFamilyWeightMap: Record = { + light: `${baseFamily}-Light`, + 'italic-light': `${baseFamily}-LightItalic`, + regular: `${baseFamily}-Regular`, + italic: `${baseFamily}-Italic`, + medium: `${baseFamily}-Medium`, + 'italic-medium': `${baseFamily}-MediumItalic`, + black: `${baseFamily}-Black`, + 'italic-black': `${baseFamily}-BlackItalic`, + bold: `${baseFamily}-Bold`, + 'italic-bold': `${baseFamily}-BoldItalic`, +}