I am not able to increase the Dialog width in material-ui next. it adds horizontal scrollbar to Dailog. is there any way to increase width of Dailog in material-ui next? Can any on help?
To change the position of a React Material UI dialog, we call makeStyles to return classes with the styles we want. to call makeStyles with an object to create the dialog class with the dialog styles inside. Then we call useStyles returned from makeStyles to return the classes object.
Customized Dialogs We create a styles function that we pass into the withStyles higher-order components with various styles. We moved the close button by setting some styles for the closeButton class. To create the DialogTitle component, we passed a component that uses the classes and children from the props.
Add two props fullWidth
and maxWidth="md"
in your Dialog
component like this :
<Dialog {...your_other_props} fullWidth maxWidth="sm" > {/* Your dialog content */} </Dialog>
You can change md
to sm
, xs
, lg
and xl
as per your requirement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With