Skip to content

Commit

Permalink
[add]Header,PrimaryLink,PullDown,SearchSelect,Tooltip,UnderlinePrimar…
Browse files Browse the repository at this point in the history
…yButton
  • Loading branch information
Ryotakobayash authored and Kubosaka committed Jul 27, 2024
1 parent 3ab6e56 commit 255139e
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 0 deletions.
29 changes: 29 additions & 0 deletions view/next-project/src/stories/common/Header.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Meta, StoryFn } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import { Header } from '@components/common';

const meta: Meta<typeof Header> = {
title: 'FinanSu/common/Header',
component: Header,
decorators: [
(Story) => (
<RecoilRoot>
<Story />
</RecoilRoot>
),
],
tags: ['autodocs'],
argTypes: {},
};

export default meta;

const Template: StoryFn<typeof Header> = (args) => <Header {...args} />;

export const Default = Template.bind({});
Default.args = {
onSideNavOpen: () => console.log('SideNav is opened'),
};

export const WithoutSideNav = Template.bind({});
WithoutSideNav.args = {};
18 changes: 18 additions & 0 deletions view/next-project/src/stories/common/PrimaryLink.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Meta } from '@storybook/react';
import { PrimaryLink } from '@components/common';

const meta: Meta<typeof PrimaryLink> = {
title: 'FinanSu/common/PrimaryLink',
component: PrimaryLink,
tags: ['autodocs'],
argTypes: {},
};

export default meta;

export const Primary = {
args: {
className: 'm-10',
children: <h1>children</h1>,
},
};
19 changes: 19 additions & 0 deletions view/next-project/src/stories/common/PullDown.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Meta } from '@storybook/react';
import { PullDown } from '@components/common';

const meta: Meta<typeof PullDown> = {
title: 'FinanSu/common/PullDown',
component: PullDown,
tags: ['autodocs'],
argTypes: {},
};

export default meta;

export const Primary = {
args: {
placeholder: 'placeholder',
value: 'value',
children: 'children',
},
};
29 changes: 29 additions & 0 deletions view/next-project/src/stories/common/SearchSelect.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Meta } from '@storybook/react';
import { SearchSelect } from '@components/common';

const meta: Meta<typeof SearchSelect> = {
title: 'FinanSu/common/SearchSelect',
component: SearchSelect,
tags: ['autodocs'],
argTypes: {},
};

export default meta;

export const Primary = {
args: {
children: 'children',
value: [
{
value: 'value1',
label: 'label1',
},
{
value: 'value2',
label: 'label2',
},
],
noOptionMessage: 'noOptionMessage',
placeholder: 'placeholder',
},
};
19 changes: 19 additions & 0 deletions view/next-project/src/stories/common/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Meta } from '@storybook/react';
import { Tooltip } from '@components/common';

const meta: Meta<typeof Tooltip> = {
title: 'FinanSu/common/Tooltip',
component: Tooltip,
tags: ['autodocs'],
argTypes: {},
};

export default meta;

export const Primary = {
args: {
className: 'm-10',
children: 'children',
text: '説明文',
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Meta } from '@storybook/react';
import { UnderlinePrimaryButton } from '@components/common';

const meta: Meta<typeof UnderlinePrimaryButton> = {
title: 'FinanSu/common/UnderlinePrimaryButton',
component: UnderlinePrimaryButton,
tags: ['autodocs'],
argTypes: {},
};

export default meta;

export const Primary = {
args: {
className: 'm-10',
children: <h1>children</h1>,
},
};

0 comments on commit 255139e

Please sign in to comment.