Setting default color for text using theme #7273
Answered
by
rtivital
jackfrosty908
asked this question in
Q&A
-
Hey All, I may be missing something in the docs, but I am looking to set a default color for all text in the app via the theme. Is setting import { slate } from './mantineCustomColors';
import { createTheme} from '@mantine/core';
const theme = createTheme({
fontFamily: 'Roboto, sans-serif',
fontFamilyMonospace: 'Monaco, Courier, monospace',
colors: {
slate,
},
black: 'red', // <-- make all text red
primaryColor: 'slate',
)} I am a little concerned that this will effect things other than text. I have also looked at overriding each component, but I feel like I'm missing something with this approach components: {
Title: {
defaultProps: {
c: 'green',
},
},
Text: {
defaultProps: {
c: 'green',
},
},
Alert: {
defaultProps: {
c: 'green',
},
},
}, If I have missed something in the docs can someone point me in the right direction? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
rtivital
Dec 18, 2024
Replies: 1 comment 4 replies
-
I did not get the question. You have the working code, as I understand. Is something wrong? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default,
--mantine-color-text
is used