Skip to content

Commit

Permalink
one action at the time
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 18, 2020
1 parent ccd6b34 commit 3d919e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions docs/src/pages/components/alert/TransitionAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useStyles = makeStyles(theme => ({
},
}));

export default function ActionAlerts() {
export default function TransitionAlerts() {
const classes = useStyles();
const [open, setOpen] = React.useState(true);

Expand All @@ -40,12 +40,13 @@ export default function ActionAlerts() {
</Alert>
</Collapse>
<Button
disabled={open}
variant="outlined"
onClick={() => {
setOpen(!open);
setOpen(true);
}}
>
{open ? 'Close' : 'Re-open'}
Re-open
</Button>
</div>
);
Expand Down
7 changes: 4 additions & 3 deletions docs/src/pages/components/alert/TransitionAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);

export default function ActionAlerts() {
export default function TransitionAlerts() {
const classes = useStyles();
const [open, setOpen] = React.useState(true);

Expand All @@ -42,12 +42,13 @@ export default function ActionAlerts() {
</Alert>
</Collapse>
<Button
disabled={open}
variant="outlined"
onClick={() => {
setOpen(!open);
setOpen(true);
}}
>
{open ? 'Close' : 'Re-open'}
Re-open
</Button>
</div>
);
Expand Down

0 comments on commit 3d919e2

Please sign in to comment.