-
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.
Merge pull request #857 from NUTFes/feat/kobayashi/CreatingstoriesFil…
…e/common-856 既存コンポーネントをStorybook上に表示する(/common)
- Loading branch information
Showing
36 changed files
with
474 additions
and
12 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
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
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/common/AddButton.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 { AddButton } from '@components/common'; | ||
|
||
const meta: Meta<typeof AddButton> = { | ||
title: 'FinanSu/common/AddButton', | ||
component: AddButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/common/BureauLabel.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 { BureauLabel } from '@components/common'; | ||
|
||
const meta: Meta<typeof BureauLabel> = { | ||
title: 'FinanSu/common/BureauLabel', | ||
component: BureauLabel, | ||
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,18 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Button } from '@components/common'; | ||
|
||
const meta: Meta<typeof Button> = { | ||
title: 'FinanSu/common/Button', | ||
component: Button, | ||
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,18 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Card } from '@components/common'; | ||
|
||
const meta: Meta<typeof Card> = { | ||
title: 'FinanSu/common/Card', | ||
component: Card, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
27 changes: 27 additions & 0 deletions
27
view/next-project/src/stories/common/ChakraUIDropdown.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,27 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { ChakraUIDropdown } from '@components/common'; | ||
|
||
const meta: Meta<typeof ChakraUIDropdown> = { | ||
title: 'FinanSu/common/ChakraUIDropdown', | ||
component: ChakraUIDropdown, | ||
decorators: [ | ||
(Story) => ( | ||
<RecoilRoot> | ||
<Story /> | ||
</RecoilRoot> | ||
), | ||
], | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof ChakraUIDropdown> = (args) => <ChakraUIDropdown {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
title: 'title', | ||
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,20 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Checkbox } from '@components/common'; | ||
|
||
const meta: Meta<typeof Checkbox> = { | ||
title: 'FinanSu/common/Checkbox', | ||
component: Checkbox, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
placeholder: 'placeholder', | ||
value: 0, | ||
checked: true, | ||
disabled: true, | ||
}, | ||
}; |
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
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
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
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
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 = {}; |
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,20 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Input } from '@components/common'; | ||
|
||
const meta: Meta<typeof Input> = { | ||
title: 'FinanSu/common/Input', | ||
component: Input, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
placeholder: 'placeholder', | ||
id: 0, | ||
value: 100, | ||
type: 'text', | ||
}, | ||
}; |
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 { Label } from '@components/common'; | ||
|
||
const meta: Meta<typeof Label> = { | ||
title: 'FinanSu/common/Label', | ||
component: Label, | ||
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,18 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Link } from '@components/common'; | ||
|
||
const meta: Meta<typeof Link> = { | ||
title: 'FinanSu/common/Link', | ||
component: Link, | ||
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,17 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { Loading } from '@components/common'; | ||
|
||
const meta: Meta<typeof Loading> = { | ||
title: 'FinanSu/common/Loading', | ||
component: Loading, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
text: '読み込み中', | ||
}, | ||
}; |
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
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
27 changes: 27 additions & 0 deletions
27
view/next-project/src/stories/common/MultiSelect.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,27 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { MultiSelect } from '@components/common'; | ||
|
||
const meta: Meta<typeof MultiSelect> = { | ||
title: 'FinanSu/common/MultiSelect', | ||
component: MultiSelect, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
options: [ | ||
{ | ||
value: 'value1', | ||
label: 'label1', | ||
}, | ||
{ | ||
value: 'value2', | ||
label: 'label2', | ||
}, | ||
], | ||
placeholder: 'placeholder', | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/common/OutlinePrimaryButton.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 { OutlinePrimaryButton } from '@components/common'; | ||
|
||
const meta: Meta<typeof OutlinePrimaryButton> = { | ||
title: 'FinanSu/common/OutlinePrimaryButton', | ||
component: OutlinePrimaryButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/common/PrimaryButton.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 { PrimaryButton } from '@components/common'; | ||
|
||
const meta: Meta<typeof PrimaryButton> = { | ||
title: 'FinanSu/common/PrimaryButton', | ||
component: PrimaryButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
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>, | ||
}, | ||
}; |
Oops, something went wrong.