#How can I achieve a site logo similar to the Mantine Logo component?
5 messages · Page 1 of 1 (latest)
you can get the theme from useMantineTheme then:
theme.colorScheme === 'dark' ? <DarkLogo /> : <LightLogo />
Currently, I am using the css hide and show two next/image. like this logoDark: {
display: theme.colorScheme === 'dark' ? 'block' : 'none',
},
logoLight: {
display: theme.colorScheme === 'dark' ? 'none' : 'block',
},
So do you meant I should created two logo component and use theme.colorScheme to switch each other?
usually the same logo is used for both theme but in your case I think you can just render the one you need using this condition