Skip to content

Commit 5d553d6

Browse files
committed
docs: add elevation and square prop documentation to PropTypes
1 parent 8ecf91e commit 5d553d6

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

packages/mui-material/src/Alert/Alert.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ const AlertRoot = styled(Paper, {
7272
[`& .${alertClasses.icon}`]: theme.vars
7373
? { color: theme.vars.palette.Alert[`${color}IconColor`] }
7474
: {
75-
color: theme.palette[color].main,
76-
},
75+
color: theme.palette[color].main,
76+
},
7777
},
7878
})),
7979
...Object.entries(theme.palette)
@@ -88,8 +88,8 @@ const AlertRoot = styled(Paper, {
8888
[`& .${alertClasses.icon}`]: theme.vars
8989
? { color: theme.vars.palette.Alert[`${color}IconColor`] }
9090
: {
91-
color: theme.palette[color].main,
92-
},
91+
color: theme.palette[color].main,
92+
},
9393
},
9494
})),
9595
...Object.entries(theme.palette)
@@ -100,16 +100,16 @@ const AlertRoot = styled(Paper, {
100100
fontWeight: theme.typography.fontWeightMedium,
101101
...(theme.vars
102102
? {
103-
color: theme.vars.palette.Alert[`${color}FilledColor`],
104-
backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`],
105-
}
103+
color: theme.vars.palette.Alert[`${color}FilledColor`],
104+
backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`],
105+
}
106106
: {
107-
backgroundColor:
108-
theme.palette.mode === 'dark'
109-
? theme.palette[color].dark
110-
: theme.palette[color].main,
111-
color: theme.palette.getContrastText(theme.palette[color].main),
112-
}),
107+
backgroundColor:
108+
theme.palette.mode === 'dark'
109+
? theme.palette[color].dark
110+
: theme.palette[color].main,
111+
color: theme.palette.getContrastText(theme.palette[color].main),
112+
}),
113113
},
114114
})),
115115
],
@@ -334,6 +334,12 @@ Alert.propTypes /* remove-proptypes */ = {
334334
closeButton: PropTypes.object,
335335
closeIcon: PropTypes.object,
336336
}),
337+
/**
338+
* Shadow depth, corresponds to `dp` in the spec.
339+
* It accepts values between 0 and 24 inclusive.
340+
* @default 0
341+
*/
342+
elevation: PropTypes.number,
337343
/**
338344
* Override the icon displayed before the children.
339345
* Unless provided, the icon is mapped to the value of the `severity` prop.

packages/mui-material/src/MobileStepper/MobileStepper.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ MobileStepper.propTypes /* remove-proptypes */ = {
269269
* @ignore
270270
*/
271271
className: PropTypes.string,
272+
/**
273+
* Shadow depth, corresponds to `dp` in the spec.
274+
* It accepts values between 0 and 24 inclusive.
275+
* @default 0
276+
*/
277+
elevation: PropTypes.number,
272278
/**
273279
* Props applied to the `LinearProgress` element.
274280
* @deprecated Use `slotProps.progress` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
@@ -303,6 +309,11 @@ MobileStepper.propTypes /* remove-proptypes */ = {
303309
progress: PropTypes.elementType,
304310
root: PropTypes.elementType,
305311
}),
312+
/**
313+
* If `false`, rounded corners are disabled.
314+
* @default true
315+
*/
316+
square: PropTypes.bool,
306317
/**
307318
* The total steps.
308319
*/

packages/mui-material/src/SnackbarContent/SnackbarContent.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ SnackbarContent.propTypes /* remove-proptypes */ = {
112112
* @ignore
113113
*/
114114
className: PropTypes.string,
115+
/**
116+
* Shadow depth, corresponds to `dp` in the spec.
117+
* It accepts values between 0 and 24 inclusive.
118+
* @default 6
119+
*/
120+
elevation: PropTypes.number,
115121
/**
116122
* The message to display.
117123
*/

0 commit comments

Comments
 (0)