Skip to content

Commit

Permalink
fix strange nested modal UX, the backdrop is important
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Feb 11, 2023
1 parent eb12bb6 commit a7fa1eb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/data/base/components/modal/NestedModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ function ChildModal() {
<React.Fragment>
<Button onClick={handleOpen}>Open Child Modal</Button>
<Modal
hideBackdrop
open={open}
onClose={handleClose}
aria-labelledby="child-modal-title"
aria-describedby="child-modal-description"
slots={{ backdrop: Backdrop }}
>
<Box sx={[style, { width: '200px' }]}>
<h2 id="child-modal-title">Text in a child modal</h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/base/components/modal/NestedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ function ChildModal() {
<React.Fragment>
<Button onClick={handleOpen}>Open Child Modal</Button>
<Modal
hideBackdrop
open={open}
onClose={handleClose}
aria-labelledby="child-modal-title"
aria-describedby="child-modal-description"
slots={{ backdrop: Backdrop }}
>
<Box sx={[style, { width: '200px' }]}>
<h2 id="child-modal-title">Text in a child modal</h2>
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/modal/NestedModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function ChildModal() {
<React.Fragment>
<Button onClick={handleOpen}>Open Child Modal</Button>
<Modal
hideBackdrop
open={open}
onClose={handleClose}
aria-labelledby="child-modal-title"
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/modal/NestedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function ChildModal() {
<React.Fragment>
<Button onClick={handleOpen}>Open Child Modal</Button>
<Modal
hideBackdrop
open={open}
onClose={handleClose}
aria-labelledby="child-modal-title"
Expand Down

0 comments on commit a7fa1eb

Please sign in to comment.