Skip to content

Commit

Permalink
add modal story for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sirineJ committed Nov 27, 2024
1 parent 8bfe66f commit 2923b4c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/circuit-ui/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,32 @@ export const Base = () => {
);
};

export const Modal = () => {
const [modalOpen, setModalOpen] = useState(false);
return (
<>
<Button
type="button"
onClick={() => {
setModalOpen(true);
}}
>
Open modal
</Button>
<Dialog
open={modalOpen}
isModal
onClose={() => setModalOpen(false)}
closeButtonLabel="Close"
aria-label="Hello World!"
aria-describedby="log1"
>
{defaultModalChildren}
</Dialog>
</>
);
};

export const Simultaneous = () => {
const [modalOpen, setModalOpen] = useState(false);
const [modalOpen2, setModalOpen2] = useState(false);
Expand Down

0 comments on commit 2923b4c

Please sign in to comment.