Raw
1 import type { Meta, StoryObj } from "@storybook/react"
2 import * as React from "react"
3
4 import { Button } from "@/components/button"
5 import { Drawer } from "./drawer"
6
7 const meta: Meta<typeof Drawer> = {
8 title: "Components/Drawer",
9 component: Drawer,
10 parameters: {
11 layout: "centered",
12 },
13 }
14
15 export default meta
16
17 type Story = StoryObj<typeof Drawer>
18
19 export const Default: Story = {
20 render: () => {
21 return (
22 <Drawer>
23 <Drawer.Trigger asChild>
24 <Button>Edit Variant</Button>
25 </Drawer.Trigger>
26 <Drawer.Content>
27 <Drawer.Header>
28 <Drawer.Title>Edit Variant</Drawer.Title>
29 </Drawer.Header>
30 <Drawer.Body></Drawer.Body>
31 <Drawer.Footer>
32 <Drawer.Close asChild>
33 <Button variant="secondary">Cancel</Button>
34 </Drawer.Close>
35 <Button>Save</Button>
36 </Drawer.Footer>
37 </Drawer.Content>
38 </Drawer>
39 )
40 },
41 }