aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/nav/main-nav/main-nav.stories.tsx
blob: 6333f2c7d666df57e3acc63fc356007a8b7da391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import type { ComponentMeta, ComponentStory } from '@storybook/react';
import { Icon } from '../../../atoms';
import { MainNav } from './main-nav';

/**
 * MainNav - Storybook Meta
 */
export default {
  title: 'Organisms/Nav/MainNav',
  component: MainNav,
  argTypes: {
    items: {
      description: 'The main nav items.',
      type: {
        name: 'object',
        required: true,
        value: {},
      },
    },
  },
} as ComponentMeta<typeof MainNav>;

const Template: ComponentStory<typeof MainNav> = (args) => (
  <MainNav {...args} />
);

/**
 * MainNav Stories - Default
 */
export const Default = Template.bind({});
Default.args = {
  items: [
    { id: 'home', label: 'Home', href: '#home' },
    { id: 'blog', label: 'Blog', href: '#blog' },
    { id: 'projects', label: 'Projects', href: '#projects' },
    { id: 'contact', label: 'Contact', href: '#contact' },
  ],
};

/**
 * MainNav Stories - WithLogo
 */
export const WithLogo = Template.bind({});
WithLogo.args = {
  items: [
    {
      id: 'home',
      label: 'Home',
      href: '#home',
      logo: <Icon aria-hidden shape="home" />,
    },
    {
      id: 'blog',
      label: 'Blog',
      href: '#blog',
      logo: <Icon aria-hidden shape="posts-stack" />,
    },
    {
      id: 'projects',
      label: 'Projects',
      href: '#projects',
      logo: <Icon aria-hidden shape="computer" />,
    },
    {
      id: 'contact',
      label: 'Contact',
      href: '#contact',
      logo: <Icon aria-hidden shape="envelop" />,
    },
  ],
};