aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/nav/nav-item/nav-item.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-20 14:06:48 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitc6f6f8f895e68f2d85ca681997ef613d982bac14 (patch)
tree50e21f0721781aad231445c4e5af24deadb2d0de /src/components/molecules/nav/nav-item/nav-item.stories.tsx
parentc3cde71e60ae22d17c1d162f678f592915ac5398 (diff)
refactor(components): rewrite NavList component
* extract NavItem from NavList * remove `kind` and `listClassName` props (since the consumer has control over NavList, NavItem and NavLink components these props are obsolete)
Diffstat (limited to 'src/components/molecules/nav/nav-item/nav-item.stories.tsx')
-rw-r--r--src/components/molecules/nav/nav-item/nav-item.stories.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/components/molecules/nav/nav-item/nav-item.stories.tsx b/src/components/molecules/nav/nav-item/nav-item.stories.tsx
new file mode 100644
index 0000000..df736a4
--- /dev/null
+++ b/src/components/molecules/nav/nav-item/nav-item.stories.tsx
@@ -0,0 +1,37 @@
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import { NavLink } from '../nav-link';
+import { NavItem } from './nav-item';
+
+/**
+ * NavItem - Storybook Meta
+ */
+export default {
+ title: 'Molecules/Nav/NavItem',
+ component: NavItem,
+ argTypes: {
+ children: {
+ control: {
+ type: 'text',
+ },
+ description: 'Define the nav item contents.',
+ type: {
+ name: 'string',
+ required: true,
+ },
+ },
+ },
+} as ComponentMeta<typeof NavItem>;
+
+const Template: ComponentStory<typeof NavItem> = (args) => (
+ <ul style={{ margin: 0, padding: 0 }}>
+ <NavItem {...args} />
+ </ul>
+);
+
+/**
+ * NavItem Stories - Default
+ */
+export const Default = Template.bind({});
+Default.args = {
+ children: <NavLink href="#example" label="Example" />,
+};