Support for bold namespace in the fonts namespace of the theme
The reasons is getting closer to what material design showcases as 'common weights' in here https://material.io/design/typography/understanding-typography.html
No related issues
Can you clarify your use case?
I'm making a design system for web (wrapping material ui) and react native (wrapping react native paper) that supports theming and one of the premises of the theme is that the fonts have the 'light' | 'regular' | 'medium' | 'thin' | 'bold' configurations.
You can put any additional stuff in the theme. I don't think it makes sense for us to add a bold to the default theme when we don't use it.
@satya164 I have a similar use case to @robertLichtnow. We are writing a component library that builds off of react-native-paper. We have our own theme file (where we can add bold), but we would like our components to be compatible with the default theme (or custom themes) as well. If we specify bold and it's not there, it defaults to regular, which is less than ideal.
@satya164 I've added the custom fonts to the:
namespace ReactNativePaper {
interface ThemeFonts {
bold: ThemeFont;
}
}
}
but now the theme object passed to the <PaperProvider theme={theme}> is giving me:
Types of property 'fonts' are incompatible.
Type 'Fonts' is missing the following properties from type 'ThemeFonts': bold,
Any way of augmenting the Fonts type?