Skip to content

Commit

Permalink
feat: add input / form storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
TomatoVan committed Nov 9, 2023
1 parent 61025fb commit 376a2a4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/features/AuthByUsername/ui/LoginForm/LoginForm.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { LoginForm } from './LoginForm';

export default {
title: 'features/LoginForm',
component: LoginForm,
argTypes: {
backgroundColor: { control: 'color' },
},
} as ComponentMeta<typeof LoginForm>;

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

Check warning on line 13 in src/features/AuthByUsername/ui/LoginForm/LoginForm.stories.tsx

View workflow job for this annotation

GitHub Actions / pipeline (17.x)

Prop spreading is forbidden

export const Primary = Template.bind({});
Primary.args = {};
19 changes: 19 additions & 0 deletions src/shared/ui/Input/Input.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { Input } from './Input';

export default {
title: 'shared/Input',
component: Input,
argTypes: {
backgroundColor: { control: 'color' },
},
} as ComponentMeta<typeof Input>;

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

export const Primary = Template.bind({});
Primary.args = {
placeholder: 'type text',
value: '12345',
};

0 comments on commit 376a2a4

Please sign in to comment.