TWNTY-892 - Add ui/title stories (#955)
* Add ui/title stories Co-authored-by: RubensRafael <rubensrafael2@live.com> * Add requested changes Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: RubensRafael <rubensrafael2@live.com> * Fix linter issues Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: RubensRafael <rubensrafael2@live.com> --------- Co-authored-by: RubensRafael <rubensrafael2@live.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { MainSectionTitle } from '../MainSectionTitle';
|
||||
|
||||
const meta: Meta<typeof MainSectionTitle> = {
|
||||
title: 'UI/Title/MainSectionTitle',
|
||||
component: MainSectionTitle,
|
||||
decorators: [ComponentDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof MainSectionTitle>;
|
||||
|
||||
const args = {
|
||||
children: 'Lorem ipsum',
|
||||
};
|
||||
|
||||
export const Default: Story = {
|
||||
args,
|
||||
decorators: [ComponentDecorator],
|
||||
};
|
||||
@ -0,0 +1,32 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { SubSectionTitle } from '../SubSectionTitle';
|
||||
|
||||
const args = {
|
||||
title: 'Lorem ipsum',
|
||||
description: 'Lorem ipsum dolor sit amet',
|
||||
};
|
||||
|
||||
const meta: Meta<typeof SubSectionTitle> = {
|
||||
title: 'UI/Title/SubSectionTitle',
|
||||
component: SubSectionTitle,
|
||||
decorators: [ComponentDecorator],
|
||||
args: {
|
||||
title: args.title,
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof SubSectionTitle>;
|
||||
|
||||
export const Default: Story = {
|
||||
decorators: [ComponentDecorator],
|
||||
};
|
||||
|
||||
export const WithDescription: Story = {
|
||||
args,
|
||||
decorators: [ComponentDecorator],
|
||||
};
|
||||
Reference in New Issue
Block a user