|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
|
|
3
|
import { Heading } from "./heading" |
|
4
|
|
|
5
|
const meta: Meta<typeof Heading> = { |
|
6
|
title: "Components/Heading", |
|
7
|
component: Heading, |
|
8
|
argTypes: { |
|
9
|
level: { |
|
10
|
control: { |
|
11
|
type: "select", |
|
12
|
}, |
|
13
|
options: ["h1", "h2", "h3"], |
|
14
|
}, |
|
15
|
}, |
|
16
|
parameters: { |
|
17
|
layout: "centered", |
|
18
|
}, |
|
19
|
} |
|
20
|
|
|
21
|
export default meta |
|
22
|
|
|
23
|
type Story = StoryObj<typeof Heading> |
|
24
|
|
|
25
|
export const H1: Story = { |
|
26
|
args: { |
|
27
|
level: "h1", |
|
28
|
children: "I am a H1 heading", |
|
29
|
}, |
|
30
|
} |
|
31
|
|
|
32
|
export const H2: Story = { |
|
33
|
args: { |
|
34
|
level: "h2", |
|
35
|
children: "I am a H2 heading", |
|
36
|
}, |
|
37
|
} |
|
38
|
|
|
39
|
export const H3: Story = { |
|
40
|
args: { |
|
41
|
level: "h3", |
|
42
|
children: "I am a H3 heading", |
|
43
|
}, |
|
44
|
} |