-
As I've been overriding theme defaults I was hoping to add my own properties, i.e. import { Title, useMantineTheme } from '@mantine/core';
function DisplayHeading ({children, style, ...props}) {
const theme = useMantineTheme()
return (
<Title style={{fontFamily: theme.fontFamilyDisplay, ...style}} {...props}>{children}</Title>
);
}
export default DisplayHeading; In my theme overrides object, I have: const mantineThemeOverrides = {
…
fontFamilyDisplay:
`"Custom Font", serif, ${EMOJI_FONT_FAMILIES}`,
…
} |
Beta Was this translation helpful? Give feedback.
Answered by
rtivital
Oct 20, 2021
Replies: 1 comment 2 replies
-
We cannot do that because TypeScript does not allow dynamic properties usage with react context. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dallanlee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We cannot do that because TypeScript does not allow dynamic properties usage with react context.