Skip to content

Commit 6e3dfd4

Browse files
committed
improve the alert examples
1 parent 97c72fa commit 6e3dfd4

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

docs/data/material/components/dialogs/AlertDialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export default function AlertDialog() {
3939
</DialogContentText>
4040
</DialogContent>
4141
<DialogActions>
42-
<Button onClick={handleClose}>Disagree</Button>
4342
<Button onClick={handleClose} autoFocus>
44-
Agree
43+
Disagree
4544
</Button>
45+
<Button onClick={handleClose}>Agree</Button>
4646
</DialogActions>
4747
</Dialog>
4848
</React.Fragment>

docs/data/material/components/dialogs/AlertDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export default function AlertDialog() {
3939
</DialogContentText>
4040
</DialogContent>
4141
<DialogActions>
42-
<Button onClick={handleClose}>Disagree</Button>
4342
<Button onClick={handleClose} autoFocus>
44-
Agree
43+
Disagree
4544
</Button>
45+
<Button onClick={handleClose}>Agree</Button>
4646
</DialogActions>
4747
</Dialog>
4848
</React.Fragment>

docs/data/material/components/dialogs/AlertDialogSlide.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export default function AlertDialogSlide() {
4545
</DialogContentText>
4646
</DialogContent>
4747
<DialogActions>
48-
<Button onClick={handleClose}>Disagree</Button>
48+
<Button onClick={handleClose} autoFocus>
49+
Disagree
50+
</Button>
4951
<Button onClick={handleClose}>Agree</Button>
5052
</DialogActions>
5153
</Dialog>

docs/data/material/components/dialogs/AlertDialogSlide.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export default function AlertDialogSlide() {
5151
</DialogContentText>
5252
</DialogContent>
5353
<DialogActions>
54-
<Button onClick={handleClose}>Disagree</Button>
54+
<Button onClick={handleClose} autoFocus>
55+
Disagree
56+
</Button>
5557
<Button onClick={handleClose}>Agree</Button>
5658
</DialogActions>
5759
</Dialog>

docs/data/material/components/dialogs/dialogs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import DialogTitle from '@mui/material/DialogTitle';
4242

4343
Alerts are urgent interruptions, requiring acknowledgement, that inform the user about a situation.
4444

45-
Use `role="alertdialog"` when creating an Alert Dialog. This provides assistive technologies the correct purpose of the Dialog.
45+
Use `role="alertdialog"` to create an Alert Dialog. This provides assistive technologies the correct purpose of the Dialog.
4646

4747
Most alerts don't need titles.
4848
They summarize a decision in a sentence or two by either:

0 commit comments

Comments
 (0)