Skip to content

Commit

Permalink
feat(dialog): add dialog stories
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILLIPS71 committed Apr 15, 2024
1 parent 1a295c3 commit 5dcf058
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions packages/react/src/components/dialog/Dialog.stories.tsx
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

0 comments on commit 5dcf058

Please sign in to comment.