aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/nav/nav-link/nav-link.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-19 19:30:54 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitc3cde71e60ae22d17c1d162f678f592915ac5398 (patch)
tree770856e0876b8c613a21fa79199d6d40609d73e6 /src/components/molecules/nav/nav-link/nav-link.stories.tsx
parent94448fa278ab352a741ff13f22d6104869571144 (diff)
refactor(components): rewrite NavLink component
* handle style variants to avoid declaring the styles in consumers
Diffstat (limited to 'src/components/molecules/nav/nav-link/nav-link.stories.tsx')
-rw-r--r--src/components/molecules/nav/nav-link/nav-link.stories.tsx89
1 files changed, 79 insertions, 10 deletions
diff --git a/src/components/molecules/nav/nav-link/nav-link.stories.tsx b/src/components/molecules/nav/nav-link/nav-link.stories.tsx
index 4e8400f..b0ad76a 100644
--- a/src/components/molecules/nav/nav-link/nav-link.stories.tsx
+++ b/src/components/molecules/nav/nav-link/nav-link.stories.tsx
@@ -49,31 +49,100 @@ const Template: ComponentStory<typeof NavLinkComponent> = (args) => (
);
/**
- * NavLink Stories - Default
+ * NavLink Stories - Regular
*/
-export const Default = Template.bind({});
-Default.args = {
+export const Regular = Template.bind({});
+Regular.args = {
href: '#',
label: 'A nav link',
};
/**
- * NavLink Stories - StackWithLogo
+ * NavLink Stories - RegularInlineWithLogo
*/
-export const StackWithLogo = Template.bind({});
-StackWithLogo.args = {
+export const RegularInlineWithLogo = Template.bind({});
+RegularInlineWithLogo.args = {
href: '#example',
+ isStack: false,
label: 'A nav link',
logo: <Icon aria-hidden shape="home" />,
};
/**
- * NavLink Stories - InlineWithLogo
+ * NavLink Stories - RegularStackWithLogo
*/
-export const InlineWithLogo = Template.bind({});
-InlineWithLogo.args = {
+export const RegularStackWithLogo = Template.bind({});
+RegularStackWithLogo.args = {
href: '#example',
- isInline: true,
+ isStack: true,
label: 'A nav link',
logo: <Icon aria-hidden shape="home" />,
};
+
+/**
+ * NavLink Stories - Block
+ */
+export const Block = Template.bind({});
+Block.args = {
+ href: '#',
+ label: 'A nav link',
+ variant: 'block',
+};
+
+/**
+ * NavLink Stories - BlockInlineWithLogo
+ */
+export const BlockInlineWithLogo = Template.bind({});
+BlockInlineWithLogo.args = {
+ href: '#example',
+ isStack: false,
+ label: 'A nav link',
+ logo: <Icon aria-hidden shape="home" />,
+ variant: 'block',
+};
+
+/**
+ * NavLink Stories - BlockStackWithLogo
+ */
+export const BlockStackWithLogo = Template.bind({});
+BlockStackWithLogo.args = {
+ href: '#example',
+ isStack: true,
+ label: 'A nav link',
+ logo: <Icon aria-hidden shape="home" />,
+ variant: 'block',
+};
+
+/**
+ * NavLink Stories - Main
+ */
+export const Main = Template.bind({});
+Main.args = {
+ href: '#',
+ label: 'A nav link',
+ variant: 'main',
+};
+
+/**
+ * NavLink Stories - MainInlineWithLogo
+ */
+export const MainInlineWithLogo = Template.bind({});
+MainInlineWithLogo.args = {
+ href: '#example',
+ isStack: false,
+ label: 'A nav link',
+ logo: <Icon aria-hidden shape="home" />,
+ variant: 'main',
+};
+
+/**
+ * NavLink Stories - MainStackWithLogo
+ */
+export const MainStackWithLogo = Template.bind({});
+MainStackWithLogo.args = {
+ href: '#example',
+ isStack: true,
+ label: 'A nav link',
+ logo: <Icon aria-hidden shape="home" />,
+ variant: 'main',
+};