Have been using Chakra for a while but I can not get my head around styling all my components, in this case, FormControl
at a global level with the theme file.
For example if i want to add margin bottom to my FormControl
and FormLabel
elements I would add the components object to the theme file like so:
components: {
Form: {
parts: ['control', 'label', 'errorMessage'],
baseStyle: {
control: {
marginBottom: '2rem',
},
label: {
marginBottom: '3rem',
},
},
},
},
But this has no effect on the base style of the rendered FormControl
or FormLabel
.
Could someone please help me with what I am doing wrong here?