aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/branding/branding.stories.tsx
blob: c2f216a8d1671300f4ac9bbc3cd13dc661d31f88 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import type { ComponentMeta, ComponentStory } from '@storybook/react';
import NextImage from 'next/image';
import { Heading } from '../../atoms';
import { Branding } from './branding';

/**
 * Branding - Storybook Meta
 */
export default {
  title: 'Molecules/Branding',
  component: Branding,
  args: {},
  argTypes: {
    baseline: {
      control: {
        type: 'object',
      },
      description: 'The brand baseline.',
      type: {
        name: 'function',
        required: false,
      },
    },
    logo: {
      control: {
        type: 'object',
      },
      description: 'The brand logo.',
      type: {
        name: 'function',
        required: true,
      },
    },
    name: {
      control: {
        type: 'object',
      },
      description: 'The brand name.',
      type: {
        name: 'function',
        required: true,
      },
    },
    url: {
      control: {
        type: 'string',
      },
      description: 'The homepage url.',
      type: {
        name: 'string',
        required: false,
      },
    },
  },
} as ComponentMeta<typeof Branding>;

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

/**
 * Branding Stories - Logo and title
 */
export const LogoAndTitle = Template.bind({});
LogoAndTitle.args = {
  logo: (
    <NextImage
      alt="Your brand logo"
      height={150}
      src="https://picsum.photos/150"
      width={150}
    />
  ),
  name: <Heading level={1}>Your brand name</Heading>,
};

/**
 * Branding Stories - Logo, title and baseline
 */
export const LogoTitleAndBaseline = Template.bind({});
LogoTitleAndBaseline.args = {
  baseline: <div>Your brand baseline if any</div>,
  logo: (
    <NextImage
      alt="Your brand logo"
      height={150}
      src="https://picsum.photos/150"
      width={150}
    />
  ),
  name: <Heading level={1}>Your brand name</Heading>,
};