summaryrefslogtreecommitdiffstats
path: root/src/components/atoms/headings/heading.stories.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/atoms/headings/heading.stories.tsx')
-rw-r--r--src/components/atoms/headings/heading.stories.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/components/atoms/headings/heading.stories.tsx b/src/components/atoms/headings/heading.stories.tsx
new file mode 100644
index 0000000..9958af9
--- /dev/null
+++ b/src/components/atoms/headings/heading.stories.tsx
@@ -0,0 +1,37 @@
+import { ComponentMeta, ComponentStory } from '@storybook/react';
+import HeadingComponent from './heading';
+
+export default {
+ title: 'Atoms/Headings',
+ component: HeadingComponent,
+ argTypes: {
+ children: {
+ description: 'Heading body.',
+ type: {
+ name: 'string',
+ required: true,
+ },
+ },
+ level: {
+ control: {
+ type: 'select',
+ },
+ description: 'Heading level.',
+ options: [1, 2, 3, 4, 5, 6],
+ type: {
+ name: 'number',
+ required: true,
+ },
+ },
+ },
+} as ComponentMeta<typeof HeadingComponent>;
+
+const Template: ComponentStory<typeof HeadingComponent> = (args) => {
+ const { level, ...props } = args;
+ return <HeadingComponent level={level || 1} {...props} />;
+};
+
+export const Heading = Template.bind({});
+Heading.args = {
+ children: 'Your title',
+};