-
Notifications
You must be signed in to change notification settings - Fork 0
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
7582e6b
commit 8725c06
Showing
2 changed files
with
31 additions
and
12 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 |
---|---|---|
@@ -1,33 +1,43 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { ChartNoAxesColumn } from 'lucide-react'; | ||
|
||
import { NavItem } from './NavItem'; | ||
import { NavItem, NavItemProps } from './NavItem'; | ||
|
||
const meta: Meta<typeof NavItem> = { | ||
const meta: Meta<NavItemProps> = { | ||
title: 'Components/NavItem', | ||
component: NavItem, | ||
parameters: { | ||
controls: { expanded: true }, | ||
}, | ||
argTypes: {}, | ||
argTypes: { | ||
open: { | ||
control: { type: 'boolean' }, | ||
description: 'Open state of the NavItem', | ||
defaultValue: false, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof NavItem>; | ||
type Story = StoryObj<NavItemProps>; | ||
|
||
export const _NavItem: Story = { | ||
render: () => ( | ||
render: (args) => ( | ||
<div className="w-72"> | ||
<NavItem | ||
label="Organisations" | ||
preIcon={<ChartNoAxesColumn className="w-6 h-6" strokeWidth={2} />} | ||
onClick={() => console.log('clicked')} | ||
{...args} | ||
> | ||
<NavItem label="Raccord" /> | ||
<NavItem label="Epitech" /> | ||
<NavItem label="Studio 17" /> | ||
<NavItem label="Epitech" /> | ||
</NavItem> | ||
</div> | ||
), | ||
args: { | ||
label: 'Organisations', | ||
onClick: () => console.log('clicked'), | ||
open: false, | ||
}, | ||
}; |
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