How to declare custom font variable with typescript

34 Views Asked by At

I am using react-native and react-native-paper for theme. I want to declare a custom font variable

https://callstack.github.io/react-native-paper/docs/guides/fonts

const CombinedDefaultTheme = {
  ...
  fontConfig: configureFonts({config: {...fontConfig, ...customFontVariant}}),
};

I also have declared this one

export const Text = customText<'displaySemiBold'>();

But I got an error on typescript

enter image description here

How to solve this issue?

Thanks in advance.

0

There are 0 best solutions below