-
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.
fix: paragraph appearing as spans + className + typing issues (#24)
* feat: add menu stories * fix: typescript + paragraph element type
- Loading branch information
1 parent
277b0a8
commit 95f42ae
Showing
4 changed files
with
66 additions
and
9 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
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
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,47 @@ | ||
import type { MenuProps } from '@/components/menu' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
|
||
import { menu } from '@giantnodes/theme' | ||
|
||
import { Button } from '@/components/button' | ||
import { Menu } from '@/components/menu' | ||
|
||
const Component: Meta<typeof Menu> = { | ||
title: 'Components/Menu', | ||
component: Menu, | ||
argTypes: { | ||
size: { | ||
control: { type: 'select' }, | ||
}, | ||
status: { | ||
control: { type: 'select' }, | ||
}, | ||
variant: { | ||
control: { type: 'select' }, | ||
}, | ||
}, | ||
} | ||
|
||
const defaultProps = { | ||
...menu.defaultVariants, | ||
} | ||
|
||
export const Default: StoryFn = (args: MenuProps) => ( | ||
<Menu {...args}> | ||
<Button>Open</Button> | ||
|
||
<Menu.Popover placement="bottom right"> | ||
<Menu.List> | ||
<Menu.Item>First</Menu.Item> | ||
<Menu.Item>Second</Menu.Item> | ||
<Menu.Item>Third</Menu.Item> | ||
</Menu.List> | ||
</Menu.Popover> | ||
</Menu> | ||
) | ||
|
||
Default.args = { | ||
...defaultProps, | ||
} | ||
|
||
export default Component |
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