How can I center the DialogTitle
(MUI)? My code:
<Dialog
open={this.state.open}
titleStyle = {styles.Dialog}
title='Title centered please!'
actions={standardActions}
onRequestClose={this.handleRequestClose}
>
Dialog boby...
</Dialog>
title with text "Ingreso de Procedimientos" centered please
I believe this is the shortest way in MUI v5. It is possible because DialogTitle
returns a styled Typography
which leverages system properties.
<DialogTitle textAlign="center">
This works for me:
<Dialog
titleStyle={{textAlign: "center"}}
... />
u can just simply use the dialog title component and add typography component in there
<DialogTitle>
<Typography variant="h3" align="center">Centered Title</Typography>
</DialogTitle>
hope this help :))
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