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 7ba1512
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/src/pages/components/alert/TransitionAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 7ba1512

Please sign in to comment.