<code> <Dialog ...>
<DialogTitle>
Edit Order
</DialogTitle>
<DialogContent>
<Formik ...>
<Form>
<NameField />
<IdField />
...
<Form/>
</Formik>
</DialogContent>
</Dialog>
</code>
<code> <Dialog ...>
<DialogTitle>
Edit Order
</DialogTitle>
<DialogContent>
<Formik ...>
<Form>
<NameField />
<IdField />
...
<Form/>
</Formik>
</DialogContent>
</Dialog>
</code>
<Dialog ...>
<DialogTitle>
Edit Order
</DialogTitle>
<DialogContent>
<Formik ...>
<Form>
<NameField />
<IdField />
...
<Form/>
</Formik>
</DialogContent>
</Dialog>
<code>import { createTheme } from '@mui/material/styles';
const theme = createTheme({
components: {
MuiDialogContent: {
styleOverrides: {
textField: {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
}
}
...
</code>
<code>import { createTheme } from '@mui/material/styles';
const theme = createTheme({
components: {
MuiDialogContent: {
styleOverrides: {
textField: {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
}
}
...
</code>
import { createTheme } from '@mui/material/styles';
const theme = createTheme({
components: {
MuiDialogContent: {
styleOverrides: {
textField: {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
}
}
...
<code>.form-field {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
</code>
<code>.form-field {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
</code>
.form-field {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
How to apply custom styles to all textField components which are children of Dialog/DialogContent component?
I tried adding these styles to styleOverrides, but it doesnt work.
If thats not possible how to do it using a class e.g. form-field class?