-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a295c3
commit 5dcf058
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { DialogProps } from '@/components/dialog' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
|
||
import { Button } from '@/components/button' | ||
import { Card } from '@/components/card' | ||
import { Dialog } from '@/components/dialog' | ||
|
||
const Component: Meta<typeof Dialog> = { | ||
title: 'Components/Dialog', | ||
component: Dialog, | ||
} | ||
|
||
const defaultProps = {} | ||
|
||
export const Default: StoryFn = (args: DialogProps) => ( | ||
<Dialog {...args}> | ||
<Button>Open</Button> | ||
|
||
<Dialog.Content> | ||
{({ close }) => ( | ||
<Card> | ||
<Card.Header>Dialog</Card.Header> | ||
|
||
<Card.Body>Dialog Content</Card.Body> | ||
|
||
<Card.Footer> | ||
<Button onPress={close}>Close</Button> | ||
</Card.Footer> | ||
</Card> | ||
)} | ||
</Dialog.Content> | ||
</Dialog> | ||
) | ||
|
||
Default.args = { | ||
...defaultProps, | ||
} | ||
|
||
export default Component |