-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add]Header,PrimaryLink,PullDown,SearchSelect,Tooltip,UnderlinePrimar…
…yButton
- Loading branch information
1 parent
3ab6e56
commit 255139e
Showing
6 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
view/next-project/src/stories/common/PrimaryLink.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
29
view/next-project/src/stories/common/SearchSelect.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '説明文', | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/common/UnderlinePrimaryButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>, | ||
}, | ||
}; |