Currently, I am in the process of updating my MUI themes using the overrides
functionality.
This is how my input field looks like:
https://i.sstatic.net/OFAGf.png
I am looking to increase the space between the label and the input field.
Below is the code for the overrides
:
const overrides: Overrides = {
MuiInput: {
root: {
backgroundColor: 'white',
border: '1px solid #cdcfd1',
borderRadius: 10,
height: 50
}
},
MuiInputBase: {
root: {
marginTop: 25
}
},
MuiInputLabel: {
asterisk: {
'&$error': { color: '#eb131b' },
color: '#eb131b',
float: 'left',
marginRight: 5
},
root: {
'&$focused': {
color: '#222',
transform: 'translate(0, 0)'
},
color: '#222',
fontSize: 16,
fontWeight: 'bold',
top: 0,
transform: 'translate(0, 0)'
},
shrink: {
transform: 'translate(0, 0)'
}
}
};
Although I want to modify the margin of MuiInputBase
to be 25
, it seems that another part of the code is overriding it:
https://i.sstatic.net/ewxFv.png
What would be the correct approach to update this through theme overrides?
Additional information: Feel free to check out this Code Sandbox link to explore and address the issue: