Skip to content

Commit 03e2190

Browse files
megosjoshwooding
authored andcommitted
[Dialog] Add support for a Dialog without a DialogTitle (mui#16980)
* Fix dialog content padding without title * even closer to spec
1 parent 67f4657 commit 03e2190

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/material-ui/src/DialogContent/DialogContent.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ export const styles = theme => ({
77
/* Styles applied to the root element. */
88
root: {
99
flex: '1 1 auto',
10-
padding: '8px 24px',
1110
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
1211
overflowY: 'auto',
12+
padding: '8px 24px',
13+
'&:first-child': {
14+
// dialog without title
15+
paddingTop: 20,
16+
},
1317
},
1418
/* Styles applied to the root element if `dividers={true}`. */
1519
dividers: {
20+
padding: '16px 24px',
1621
borderTop: `1px solid ${theme.palette.divider}`,
1722
borderBottom: `1px solid ${theme.palette.divider}`,
1823
},

packages/material-ui/src/DialogContentText/DialogContentText.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Typography from '../Typography';
66
export const styles = {
77
/* Styles applied to the root element. */
88
root: {
9-
marginBottom: 16,
9+
marginBottom: 12,
1010
},
1111
};
1212

0 commit comments

Comments
 (0)