chore: remove Dialog story

This commit is contained in:
p-sw 2024-06-03 19:33:04 +09:00
parent 5f1ffd6646
commit 7ecd3282c3

View File

@ -1,103 +0,0 @@
import { Button } from "../components/Button";
import {
DialogClose,
DialogContent,
DialogFooter,
DialogHeader,
DialogOverlay,
DialogRoot,
DialogSubtitle,
DialogTitle,
DialogTrigger,
} from "../components/Dialog";
export default {
title: "React/Dialog",
};
export const Default = () => {
return (
<DialogRoot>
<DialogTrigger>
<Button
onClick={(e) => {
console.log(`Opened dialog: `, e.currentTarget);
}}
>
Open Dialog
</Button>
</DialogTrigger>
<DialogOverlay>
<DialogContent size={"fullMd"}>
<DialogHeader>
<DialogTitle>Lorem Ipsum</DialogTitle>
<DialogSubtitle>This is a test dialog</DialogSubtitle>
</DialogHeader>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
</p>
<DialogFooter>
<DialogClose>
<Button
onClick={(e) => {
console.log(`Closed dialog: `, e.currentTarget);
}}
>
Close
</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</DialogOverlay>
</DialogRoot>
);
};
export const WithCloseOnClick = () => {
return (
<DialogRoot>
<DialogTrigger>
<Button
onClick={(e) => {
console.log(`Opened dialog: `, e.currentTarget);
}}
>
Open Dialog
</Button>
</DialogTrigger>
<DialogOverlay
closeOnClick
onClick={(e) => {
console.log(`Closed dialog on overlay click: `, e.currentTarget);
}}
>
<DialogContent size={"fullMd"}>
<DialogHeader>
<DialogTitle>Lorem Ipsum</DialogTitle>
<DialogSubtitle>This is a test dialog</DialogSubtitle>
</DialogHeader>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
</p>
<DialogFooter>
<DialogClose>
<Button
onClick={(e) => {
console.log(`Closed dialog: `, e.currentTarget);
}}
>
Close Dialog
</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</DialogOverlay>
</DialogRoot>
);
};