You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/api/alert.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,13 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
28
28
| <spanclass="prop-name">children</span> | <spanclass="prop-type">node</span> || The content of the component. |
29
29
| <spanclass="prop-name">classes</span> | <spanclass="prop-type">object</span> || Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
30
30
| <spanclass="prop-name">closeText</span> | <spanclass="prop-type">string</span> | <spanclass="prop-default">'Close'</span> | Override the default text for the *close popup* icon button.<br>For localization purposes, you can use the provided [translations](/guides/localization/). |
31
-
| <spanclass="prop-name">color</span> | <spanclass="prop-type">'error'<br>| 'info'<br>| 'success'<br>| 'warning'</span> |<spanclass="prop-default">'success'</span> | Main color for the Alert, picked from theme palette. |
31
+
| <spanclass="prop-name">color</span> | <spanclass="prop-type">'error'<br>| 'info'<br>| 'success'<br>| 'warning'</span> || The main color for the alert. Unless provided, the value is taken from the `severity` prop. |
32
32
| <spanclass="prop-name">icon</span> | <spanclass="prop-type">node</span> || The icon element placed before the children. |
33
-
| <spanclass="prop-name">iconMapping</span> | <spanclass="prop-type">{ error?: node, info?: node, success?: node, warning?: node }</span> | <spanclass="prop-default">{ success: <SuccessOutlinedIcon fontSize="inherit" />, warning: <ReportProblemOutlinedIcon fontSize="inherit" />, error: <ErrorOutlinedIcon fontSize="inherit" />, info: <InfoOutlinedIcon fontSize="inherit" />,}</span> | The component maps the color prop to a range of different icons. For instance, success to `<SuccessOutlined>`. If you wish to change that mapping, you can provide your own. Alternatively, you can use the `icon` prop. |
33
+
| <spanclass="prop-name">iconMapping</span> | <spanclass="prop-type">{ error?: node, info?: node, success?: node, warning?: node }</span> | <spanclass="prop-default">{ success: <SuccessOutlinedIcon fontSize="inherit" />, warning: <ReportProblemOutlinedIcon fontSize="inherit" />, error: <ErrorOutlineIcon fontSize="inherit" />, info: <InfoOutlinedIcon fontSize="inherit" />,}</span> | The component maps the color prop to a range of different icons. For instance, success to `<SuccessOutlined>`. If you wish to change that mapping, you can provide your own. Alternatively, you can use the `icon` prop. |
34
34
| <spanclass="prop-name">onClose</span> | <spanclass="prop-type">func</span> || Callback fired when the component requests to be closed. When provided and no action prop is set, a close icon is displayed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. |
35
35
| <spanclass="prop-name">role</span> | <spanclass="prop-type">string</span> | <spanclass="prop-default">'alert'</span> | The role attribute of the element. |
36
-
| <spanclass="prop-name">variant</span> | <spanclass="prop-type">'filled'<br>| 'outlined'<br>| 'text'</span> | <spanclass="prop-default">'text'</span> | The variant of the Alert. |
36
+
| <spanclass="prop-name">severity</span> | <spanclass="prop-type">'error'<br>| 'info'<br>| 'success'<br>| 'warning'</span> | <spanclass="prop-default">'success'</span> | The severity for the alert. |
37
+
| <spanclass="prop-name">variant</span> | <spanclass="prop-type">'filled'<br>| 'outlined'<br>| 'text'</span> | <spanclass="prop-default">'text'</span> | The variant to use. |
Copy file name to clipboardExpand all lines: docs/pages/api/snackbar-content.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
24
24
25
25
| Name | Type | Default | Description |
26
26
|:-----|:-----|:--------|:------------|
27
-
| <spanclass="prop-name">action</span> | <spanclass="prop-type">node</span> || The action to display. It renders after the message, at the end of the alert. |
27
+
| <spanclass="prop-name">action</span> | <spanclass="prop-type">node</span> || The action to display. It renders after the message, at the end of the snackbar. |
28
28
| <spanclass="prop-name">classes</span> | <spanclass="prop-type">object</span> || Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
29
29
| <spanclass="prop-name">message</span> | <spanclass="prop-type">node</span> || The message to display. |
30
30
| <spanclass="prop-name">role</span> | <spanclass="prop-type">'alert'<br>| 'alertdialog'</span> | <spanclass="prop-default">'alert'</span> | The role attribute of the element. If the Snackbar requires focus to be closed, the `alertdialog` role should be used instead. |
0 commit comments