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
* docs(alert-dialog): fixed modal example
* docs(alert-dialog): fixed typo
* docs(alert-dialog): added dialog base example
* docs(alert-dialog): added links to overlay and modal
Copy file name to clipboardExpand all lines: packages/alert-dialog/README.md
+89-43Lines changed: 89 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,9 @@ import { AlertDialog } from '@spectrum-web-components/alert-dialog';
27
27
28
28
The alert dialog consists of several key parts:
29
29
30
-
-**Title:** All alert dialogs must have a title, using `slot="heading"`, that uses a few words to convey the outcome of what will happen if a user continues with an action
31
-
-**Content:** Alert dialogs can include a description using the default slot. A description briefly communicates any additional information or context that a user needs to know to continue with an action
32
-
-Action buttons, using `slot="button"`, that allow users to respond
30
+
-**Title:** All alert dialogs must have a title, using `slot="heading"`, that uses a few words to convey the outcome of what will happen if a user continues with an action
31
+
-**Content:** Alert dialogs can include a description using the default slot. A description briefly communicates any additional information or context that a user needs to know to continue with an action
32
+
- Action buttons, using `slot="button"`, that allow users to respond
33
33
34
34
```html
35
35
<sp-alert-dialog
@@ -63,12 +63,12 @@ The alert dialog consists of several key parts:
63
63
64
64
Use `slot="button"` to render your action button(s) that allow users to respond
65
65
66
-
-An alert dialog must have one primary action button (with `variant="primary"`) with the option to include a secondary action and/or a cancel action.
67
-
-Non-primary action buttons should be `variant="secondary"` and `treatment="outline"`.
68
-
-The three buttons should be rendered in the DOM in the following order:
69
-
-**Cancel action:** Offers an option to go back and cancel the action.
70
-
-**Secondary action:** Offers a secondary action. e.g. "Remind me later"
71
-
-**Primary action:** The first (right-most) button communicates what the button will do if selected, or to acknowledge and dismiss the dialog. Check [variants](#variants) for the correct primary button styling. See also the [Alert Dialog design options](https://spectrum.adobe.com/page/alert-dialog/#Options).
66
+
- An alert dialog must have one primary action button (with `variant="primary"`) with the option to include a secondary action and/or a cancel action.
67
+
- Non-primary action buttons should be `variant="secondary"` and `treatment="outline"`.
68
+
- The three buttons should be rendered in the DOM in the following order:
69
+
-**Cancel action:** Offers an option to go back and cancel the action.
70
+
-**Secondary action:** Offers a secondary action. e.g. "Remind me later"
71
+
-**Primary action:** The first (right-most) button communicates what the button will do if selected, or to acknowledge and dismiss the dialog. Check [variants](#variants) for the correct primary button styling. See also the [Alert Dialog design options](https://spectrum.adobe.com/page/alert-dialog/#Options).
72
72
73
73
```html
74
74
<sp-alert-dialog
@@ -296,57 +296,103 @@ Destructive alert dialogs are for when a user needs to confirm an action that wi
296
296
297
297
#### Context
298
298
299
-
An alert dialog should be placed inside a modal overaly:
299
+
An alert dialog should be placed inside a modal [overlay](../overlay/) or a [dialog base](../dialog-base/):
300
+
301
+
<sp-tabsselected="modal"autolabel="Alert dialogs in context">
0 commit comments