March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's say that you want the title and the actions of Dialog components centered. Since you want the same style applied for every Dialog component in your app, the theme is the right place to override this setting. Here's how to do it:
import React from 'react';import { createMuiTheme, MuiThemeProvider} from '@material-ui/core/styles';import Button from '@material-ui/core/Button';import Dialog from '@material-ui/core/Dialog';import DialogActions from '@material-ui/core/DialogActions';import DialogContent from '@material-ui/core/DialogContent';import DialogContentText from '@material-ui/core/DialogContentText';import DialogTitle from '@material-ui/core/DialogTitle';const theme = createMuiTheme({ overrides: { MuiDialogTitle: { root: ...Read now
Unlock full access