From a1c6ec4f1fc0891a1341d25e834dea196d6bf808 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 13:17:41 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[change]=E4=BD=9C=E6=88=90=E6=B8=88?= =?UTF-8?q?=E3=81=BFstories=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=AB=E3=83=80=E5=88=86=E3=81=91=EF=BC=88?= =?UTF-8?q?/common=EF=BC=89#856?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/index.ts | 1 + .../src/stories/OpenModalButton.stories.tsx | 2 +- .../common/ChakraUIDropdown.stories.tsx | 18 ++++++++++++++++++ .../{ => common}/CloseButton.stories.tsx | 2 +- .../{ => common}/DeleteButton.stories.tsx | 2 +- .../stories/{ => common}/Dropdown.stories.tsx | 2 +- .../{ => common}/EditButton.stories.tsx | 2 +- .../{ => common}/LoadingButton.stories.tsx | 2 +- .../src/stories/{ => common}/Modal.stories.tsx | 2 +- .../{ => common}/PulldownButton.stories.tsx | 2 +- .../{ => common}/RegistButton.stories.tsx | 3 ++- .../stories/{ => common}/SideNav.stories.tsx | 2 +- .../stories/{ => common}/Stepper.stories.tsx | 2 +- .../src/stories/{ => common}/Title.stories.tsx | 2 +- 14 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx rename view/next-project/src/stories/{ => common}/CloseButton.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/DeleteButton.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/Dropdown.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/EditButton.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/LoadingButton.stories.tsx (88%) rename view/next-project/src/stories/{ => common}/Modal.stories.tsx (90%) rename view/next-project/src/stories/{ => common}/PulldownButton.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/RegistButton.stories.tsx (88%) rename view/next-project/src/stories/{ => common}/SideNav.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/Stepper.stories.tsx (89%) rename view/next-project/src/stories/{ => common}/Title.stories.tsx (90%) diff --git a/view/next-project/src/components/common/index.ts b/view/next-project/src/components/common/index.ts index 46838d5a2..3b726c5b8 100644 --- a/view/next-project/src/components/common/index.ts +++ b/view/next-project/src/components/common/index.ts @@ -13,6 +13,7 @@ export { default as OutlinePrimaryButton } from './OutlinePrimaryButton'; export { default as OpenModalButton } from './OpenModalButton'; export { default as PrimaryButton } from './PrimaryButton'; export { default as PullDown } from './PullDown'; +export { default as PulldownButton } from './PulldownButton'; export { default as Radio } from './Radio'; export { default as RedButton } from './RedButton'; export { default as RegistButton } from './RegistButton'; diff --git a/view/next-project/src/stories/OpenModalButton.stories.tsx b/view/next-project/src/stories/OpenModalButton.stories.tsx index d6bcc82d8..73f50a416 100644 --- a/view/next-project/src/stories/OpenModalButton.stories.tsx +++ b/view/next-project/src/stories/OpenModalButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { OpenModalButton } from '@components/common'; const meta: Meta = { - title: 'FinanSu/OpenModalButton', + title: 'FinanSu/common/OpenModalButton', component: OpenModalButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx b/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx new file mode 100644 index 000000000..e28bdf621 --- /dev/null +++ b/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import ChakraUIDropdown from '@/components/common/ChakraUIDropdown'; + +const meta: Meta = { + title: 'FinanSu/common/ChakraUIDropdown', + component: ChakraUIDropdown, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/CloseButton.stories.tsx b/view/next-project/src/stories/common/CloseButton.stories.tsx similarity index 89% rename from view/next-project/src/stories/CloseButton.stories.tsx rename to view/next-project/src/stories/common/CloseButton.stories.tsx index 82353e25f..f801dac6a 100644 --- a/view/next-project/src/stories/CloseButton.stories.tsx +++ b/view/next-project/src/stories/common/CloseButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { CloseButton } from '@components/common'; const meta: Meta = { - title: 'FinanSu/CloseButton', + title: 'FinanSu/common/CloseButton', component: CloseButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/DeleteButton.stories.tsx b/view/next-project/src/stories/common/DeleteButton.stories.tsx similarity index 89% rename from view/next-project/src/stories/DeleteButton.stories.tsx rename to view/next-project/src/stories/common/DeleteButton.stories.tsx index b1cc81f33..27fa2c394 100644 --- a/view/next-project/src/stories/DeleteButton.stories.tsx +++ b/view/next-project/src/stories/common/DeleteButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { DeleteButton } from '@components/common'; const meta: Meta = { - title: 'FinanSu/DeleteButton', + title: 'FinanSu/common/DeleteButton', component: DeleteButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/Dropdown.stories.tsx b/view/next-project/src/stories/common/Dropdown.stories.tsx similarity index 89% rename from view/next-project/src/stories/Dropdown.stories.tsx rename to view/next-project/src/stories/common/Dropdown.stories.tsx index 7ecd4b87f..294e3b83d 100644 --- a/view/next-project/src/stories/Dropdown.stories.tsx +++ b/view/next-project/src/stories/common/Dropdown.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { Dropdown } from '@components/common'; const meta: Meta = { - title: 'FinanSu/Dropdown', + title: 'FinanSu/common/Dropdown', component: Dropdown, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/EditButton.stories.tsx b/view/next-project/src/stories/common/EditButton.stories.tsx similarity index 89% rename from view/next-project/src/stories/EditButton.stories.tsx rename to view/next-project/src/stories/common/EditButton.stories.tsx index cd51806b8..849b5b67a 100644 --- a/view/next-project/src/stories/EditButton.stories.tsx +++ b/view/next-project/src/stories/common/EditButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { EditButton } from '@components/common'; const meta: Meta = { - title: 'FinanSu/EditButton', + title: 'FinanSu/common/EditButton', component: EditButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/LoadingButton.stories.tsx b/view/next-project/src/stories/common/LoadingButton.stories.tsx similarity index 88% rename from view/next-project/src/stories/LoadingButton.stories.tsx rename to view/next-project/src/stories/common/LoadingButton.stories.tsx index 4c4b704ac..abea25e7f 100644 --- a/view/next-project/src/stories/LoadingButton.stories.tsx +++ b/view/next-project/src/stories/common/LoadingButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { LoadingButton } from '@components/common'; const meta: Meta = { - title: 'FinanSu/LoadingButton', + title: 'FinanSu/common/LoadingButton', component: LoadingButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/Modal.stories.tsx b/view/next-project/src/stories/common/Modal.stories.tsx similarity index 90% rename from view/next-project/src/stories/Modal.stories.tsx rename to view/next-project/src/stories/common/Modal.stories.tsx index fdf98a7b5..a5b14b8ef 100644 --- a/view/next-project/src/stories/Modal.stories.tsx +++ b/view/next-project/src/stories/common/Modal.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { Modal } from '@components/common'; const meta: Meta = { - title: 'FinanSu/Modal', + title: 'FinanSu/common/Modal', component: Modal, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/PulldownButton.stories.tsx b/view/next-project/src/stories/common/PulldownButton.stories.tsx similarity index 89% rename from view/next-project/src/stories/PulldownButton.stories.tsx rename to view/next-project/src/stories/common/PulldownButton.stories.tsx index feebdf5de..17b4b5116 100644 --- a/view/next-project/src/stories/PulldownButton.stories.tsx +++ b/view/next-project/src/stories/common/PulldownButton.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import PulldownButton from '@/components/common/PulldownButton'; const meta: Meta = { - title: 'FinanSu/PulldownButton', + title: 'FinanSu/common/PulldownButton', component: PulldownButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/RegistButton.stories.tsx b/view/next-project/src/stories/common/RegistButton.stories.tsx similarity index 88% rename from view/next-project/src/stories/RegistButton.stories.tsx rename to view/next-project/src/stories/common/RegistButton.stories.tsx index 9098a68ef..4ab88ad6f 100644 --- a/view/next-project/src/stories/RegistButton.stories.tsx +++ b/view/next-project/src/stories/common/RegistButton.stories.tsx @@ -1,7 +1,8 @@ import { Meta } from '@storybook/react'; import { RegistButton } from '@components/common'; + const meta: Meta = { - title: 'FinanSu/RegistButton', + title: 'FinanSu/common/RegistButton', component: RegistButton, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/SideNav.stories.tsx b/view/next-project/src/stories/common/SideNav.stories.tsx similarity index 89% rename from view/next-project/src/stories/SideNav.stories.tsx rename to view/next-project/src/stories/common/SideNav.stories.tsx index 734cf569b..07def51b7 100644 --- a/view/next-project/src/stories/SideNav.stories.tsx +++ b/view/next-project/src/stories/common/SideNav.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { SideNav } from '@components/common'; const meta: Meta = { - title: 'FinanSu/SideNav', + title: 'FinanSu/common/SideNav', component: SideNav, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/Stepper.stories.tsx b/view/next-project/src/stories/common/Stepper.stories.tsx similarity index 89% rename from view/next-project/src/stories/Stepper.stories.tsx rename to view/next-project/src/stories/common/Stepper.stories.tsx index 44c893412..3358ef88c 100644 --- a/view/next-project/src/stories/Stepper.stories.tsx +++ b/view/next-project/src/stories/common/Stepper.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { Stepper } from '@components/common'; const meta: Meta = { - title: 'FinanSu/Stepper', + title: 'FinanSu/common/Stepper', component: Stepper, tags: ['autodocs'], argTypes: {}, diff --git a/view/next-project/src/stories/Title.stories.tsx b/view/next-project/src/stories/common/Title.stories.tsx similarity index 90% rename from view/next-project/src/stories/Title.stories.tsx rename to view/next-project/src/stories/common/Title.stories.tsx index 21f1a32a4..83ded210c 100644 --- a/view/next-project/src/stories/Title.stories.tsx +++ b/view/next-project/src/stories/common/Title.stories.tsx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'; import { Title } from '@components/common'; const meta: Meta = { - title: 'FinanSu/Title', + title: 'FinanSu/common/Title', component: Title, tags: ['autodocs'], argTypes: {}, From 7a3e889873fb174cd3e252ca5be45bc16b19d3b3 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 13:25:26 +0900 Subject: [PATCH 2/7] [mod]ChakraUIDropdown.stories.tsx --- .../common/ChakraUIDropdown.stories.tsx | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx b/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx index e28bdf621..cc348b61b 100644 --- a/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx +++ b/view/next-project/src/stories/common/ChakraUIDropdown.stories.tsx @@ -1,18 +1,27 @@ -import { Meta } from '@storybook/react'; -import ChakraUIDropdown from '@/components/common/ChakraUIDropdown'; +import { Meta, StoryFn } from '@storybook/react'; +import { RecoilRoot } from 'recoil'; +import { ChakraUIDropdown } from '@components/common'; const meta: Meta = { title: 'FinanSu/common/ChakraUIDropdown', component: ChakraUIDropdown, + decorators: [ + (Story) => ( + + + + ), + ], tags: ['autodocs'], argTypes: {}, }; export default meta; -export const Primary = { - args: { - className: 'm-10', - children:

children

, - }, +const Template: StoryFn = (args) => ; + +export const Primary = Template.bind({}); +Primary.args = { + title: 'title', + children:

children

, }; From 41c061573833114c4806b8cdb50a9978b913c4e3 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 13:29:03 +0900 Subject: [PATCH 3/7] [add]AddButton,BureauLabel,Button #856 --- .../src/stories/common/AddButton.stories.tsx | 18 ++++++++++++++++++ .../src/stories/common/BureauLabel.stories.tsx | 18 ++++++++++++++++++ .../src/stories/common/Button.stories.tsx | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 view/next-project/src/stories/common/AddButton.stories.tsx create mode 100644 view/next-project/src/stories/common/BureauLabel.stories.tsx create mode 100644 view/next-project/src/stories/common/Button.stories.tsx diff --git a/view/next-project/src/stories/common/AddButton.stories.tsx b/view/next-project/src/stories/common/AddButton.stories.tsx new file mode 100644 index 000000000..825acecdd --- /dev/null +++ b/view/next-project/src/stories/common/AddButton.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { AddButton } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/AddButton', + component: AddButton, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/BureauLabel.stories.tsx b/view/next-project/src/stories/common/BureauLabel.stories.tsx new file mode 100644 index 000000000..4375764a8 --- /dev/null +++ b/view/next-project/src/stories/common/BureauLabel.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { BureauLabel } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/BureauLabel', + component: BureauLabel, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/Button.stories.tsx b/view/next-project/src/stories/common/Button.stories.tsx new file mode 100644 index 000000000..5eb8f52ef --- /dev/null +++ b/view/next-project/src/stories/common/Button.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { Button } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Button', + component: Button, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; From 8c1477d345221c53bc2865eb658490b899c1ac3e Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 13:39:58 +0900 Subject: [PATCH 4/7] [add]Card,Checkbox,Input,Label #856 --- .../src/stories/common/Card.stories.tsx | 18 +++++++++++++++++ .../src/stories/common/Checkbox.stories.tsx | 20 +++++++++++++++++++ .../src/stories/common/Input.stories.tsx | 20 +++++++++++++++++++ .../src/stories/common/Label.stories.tsx | 18 +++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 view/next-project/src/stories/common/Card.stories.tsx create mode 100644 view/next-project/src/stories/common/Checkbox.stories.tsx create mode 100644 view/next-project/src/stories/common/Input.stories.tsx create mode 100644 view/next-project/src/stories/common/Label.stories.tsx diff --git a/view/next-project/src/stories/common/Card.stories.tsx b/view/next-project/src/stories/common/Card.stories.tsx new file mode 100644 index 000000000..d86ec4a3b --- /dev/null +++ b/view/next-project/src/stories/common/Card.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { Card } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Card', + component: Card, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/Checkbox.stories.tsx b/view/next-project/src/stories/common/Checkbox.stories.tsx new file mode 100644 index 000000000..f36a1ec6d --- /dev/null +++ b/view/next-project/src/stories/common/Checkbox.stories.tsx @@ -0,0 +1,20 @@ +import { Meta } from '@storybook/react'; +import { Checkbox } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Checkbox', + component: Checkbox, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + placeholder: 'placeholder', + value: 0, + checked: true, + disabled: true, + }, +}; diff --git a/view/next-project/src/stories/common/Input.stories.tsx b/view/next-project/src/stories/common/Input.stories.tsx new file mode 100644 index 000000000..3ad9905c0 --- /dev/null +++ b/view/next-project/src/stories/common/Input.stories.tsx @@ -0,0 +1,20 @@ +import { Meta } from '@storybook/react'; +import { Input } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Input', + component: Input, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + placeholder: 'placeholder', + id: 0, + value: 100, + type: 'text', + }, +}; diff --git a/view/next-project/src/stories/common/Label.stories.tsx b/view/next-project/src/stories/common/Label.stories.tsx new file mode 100644 index 000000000..eb0907a46 --- /dev/null +++ b/view/next-project/src/stories/common/Label.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { Label } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Label', + component: Label, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; From f837ed452d881a38b58c1c2c7c4247ce3efd5e29 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 13:57:49 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[add]Button=E9=96=A2=E9=80=A3=EF=BC=88Outli?= =?UTF-8?q?nePrimary,Primary,Red=EF=BC=89#856?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/OutlinePrimaryButton.stories.tsx | 18 ++++++++++++++++++ .../stories/common/PrimaryButton.stories.tsx | 18 ++++++++++++++++++ .../src/stories/common/RedButton.stories.tsx | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 view/next-project/src/stories/common/OutlinePrimaryButton.stories.tsx create mode 100644 view/next-project/src/stories/common/PrimaryButton.stories.tsx create mode 100644 view/next-project/src/stories/common/RedButton.stories.tsx diff --git a/view/next-project/src/stories/common/OutlinePrimaryButton.stories.tsx b/view/next-project/src/stories/common/OutlinePrimaryButton.stories.tsx new file mode 100644 index 000000000..8f7920df8 --- /dev/null +++ b/view/next-project/src/stories/common/OutlinePrimaryButton.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { OutlinePrimaryButton } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/OutlinePrimaryButton', + component: OutlinePrimaryButton, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/PrimaryButton.stories.tsx b/view/next-project/src/stories/common/PrimaryButton.stories.tsx new file mode 100644 index 000000000..0206f3359 --- /dev/null +++ b/view/next-project/src/stories/common/PrimaryButton.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { PrimaryButton } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/PrimaryButton', + component: PrimaryButton, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/RedButton.stories.tsx b/view/next-project/src/stories/common/RedButton.stories.tsx new file mode 100644 index 000000000..813a39943 --- /dev/null +++ b/view/next-project/src/stories/common/RedButton.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { RedButton } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/RedButton', + component: RedButton, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; From 3b3b692a94c1404ba005341b81fd49ebe20654b4 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 14:28:56 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[add]=E5=85=A5=E5=8A=9B=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E9=96=A2=E9=80=A3(Link,Loading,MultiSelect,R?= =?UTF-8?q?adio,Select,Textarea)#856?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/stories/common/Link.stories.tsx | 18 +++++++++++++ .../src/stories/common/Loading.stories.tsx | 17 ++++++++++++ .../stories/common/MultiSelect.stories.tsx | 27 +++++++++++++++++++ .../src/stories/common/Radio.stories.tsx | 15 +++++++++++ .../src/stories/common/Select.stories.tsx | 20 ++++++++++++++ .../src/stories/common/Textarea.stories.tsx | 20 ++++++++++++++ 6 files changed, 117 insertions(+) create mode 100644 view/next-project/src/stories/common/Link.stories.tsx create mode 100644 view/next-project/src/stories/common/Loading.stories.tsx create mode 100644 view/next-project/src/stories/common/MultiSelect.stories.tsx create mode 100644 view/next-project/src/stories/common/Radio.stories.tsx create mode 100644 view/next-project/src/stories/common/Select.stories.tsx create mode 100644 view/next-project/src/stories/common/Textarea.stories.tsx diff --git a/view/next-project/src/stories/common/Link.stories.tsx b/view/next-project/src/stories/common/Link.stories.tsx new file mode 100644 index 000000000..6470bfdf9 --- /dev/null +++ b/view/next-project/src/stories/common/Link.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { Link } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Link', + component: Link, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/Loading.stories.tsx b/view/next-project/src/stories/common/Loading.stories.tsx new file mode 100644 index 000000000..b141569c9 --- /dev/null +++ b/view/next-project/src/stories/common/Loading.stories.tsx @@ -0,0 +1,17 @@ +import { Meta } from '@storybook/react'; +import { Loading } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Loading', + component: Loading, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + text: '読み込み中', + }, +}; diff --git a/view/next-project/src/stories/common/MultiSelect.stories.tsx b/view/next-project/src/stories/common/MultiSelect.stories.tsx new file mode 100644 index 000000000..08da6b447 --- /dev/null +++ b/view/next-project/src/stories/common/MultiSelect.stories.tsx @@ -0,0 +1,27 @@ +import { Meta } from '@storybook/react'; +import { MultiSelect } from '@components/common'; + +const meta: Meta = { + 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', + }, +}; diff --git a/view/next-project/src/stories/common/Radio.stories.tsx b/view/next-project/src/stories/common/Radio.stories.tsx new file mode 100644 index 000000000..d5e0b7bf4 --- /dev/null +++ b/view/next-project/src/stories/common/Radio.stories.tsx @@ -0,0 +1,15 @@ +import { Meta } from '@storybook/react'; +import { Radio } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Radio', + component: Radio, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: {}, +}; diff --git a/view/next-project/src/stories/common/Select.stories.tsx b/view/next-project/src/stories/common/Select.stories.tsx new file mode 100644 index 000000000..8efbe57aa --- /dev/null +++ b/view/next-project/src/stories/common/Select.stories.tsx @@ -0,0 +1,20 @@ +import { Meta } from '@storybook/react'; +import { Select } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Select', + component: Select, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + children: 'children', + placeholder: 'placeholder', + value: '0', + defaultValue: '1', + }, +}; diff --git a/view/next-project/src/stories/common/Textarea.stories.tsx b/view/next-project/src/stories/common/Textarea.stories.tsx new file mode 100644 index 000000000..11e93e203 --- /dev/null +++ b/view/next-project/src/stories/common/Textarea.stories.tsx @@ -0,0 +1,20 @@ +import { Meta } from '@storybook/react'; +import { Textarea } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Textarea', + component: Textarea, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + children: 'children', + placeholder: 'placeholder', + id: 'id', + value: 'サンプルテキストああああああああああああああああああ', + }, +}; From f8da74432ac33c44454d0b1875507dd1f7e06e60 Mon Sep 17 00:00:00 2001 From: Ryotakobayash Date: Fri, 26 Jul 2024 15:11:00 +0900 Subject: [PATCH 7/7] [add]Header,PrimaryLink,PullDown,SearchSelect,Tooltip,UnderlinePrimaryButton --- .../src/stories/common/Header.stories.tsx | 29 +++++++++++++++++++ .../stories/common/PrimaryLink.stories.tsx | 18 ++++++++++++ .../src/stories/common/PullDown.stories.tsx | 19 ++++++++++++ .../stories/common/SearchSelect.stories.tsx | 29 +++++++++++++++++++ .../src/stories/common/Tooltip.stories.tsx | 19 ++++++++++++ .../common/UnderlinePrimaryButton.stories.tsx | 18 ++++++++++++ 6 files changed, 132 insertions(+) create mode 100644 view/next-project/src/stories/common/Header.stories.tsx create mode 100644 view/next-project/src/stories/common/PrimaryLink.stories.tsx create mode 100644 view/next-project/src/stories/common/PullDown.stories.tsx create mode 100644 view/next-project/src/stories/common/SearchSelect.stories.tsx create mode 100644 view/next-project/src/stories/common/Tooltip.stories.tsx create mode 100644 view/next-project/src/stories/common/UnderlinePrimaryButton.stories.tsx diff --git a/view/next-project/src/stories/common/Header.stories.tsx b/view/next-project/src/stories/common/Header.stories.tsx new file mode 100644 index 000000000..371311b0a --- /dev/null +++ b/view/next-project/src/stories/common/Header.stories.tsx @@ -0,0 +1,29 @@ +import { Meta, StoryFn } from '@storybook/react'; +import { RecoilRoot } from 'recoil'; +import { Header } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Header', + component: Header, + decorators: [ + (Story) => ( + + + + ), + ], + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +const Template: StoryFn = (args) =>
; + +export const Default = Template.bind({}); +Default.args = { + onSideNavOpen: () => console.log('SideNav is opened'), +}; + +export const WithoutSideNav = Template.bind({}); +WithoutSideNav.args = {}; diff --git a/view/next-project/src/stories/common/PrimaryLink.stories.tsx b/view/next-project/src/stories/common/PrimaryLink.stories.tsx new file mode 100644 index 000000000..80cf654b2 --- /dev/null +++ b/view/next-project/src/stories/common/PrimaryLink.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { PrimaryLink } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/PrimaryLink', + component: PrimaryLink, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +}; diff --git a/view/next-project/src/stories/common/PullDown.stories.tsx b/view/next-project/src/stories/common/PullDown.stories.tsx new file mode 100644 index 000000000..02c8d540b --- /dev/null +++ b/view/next-project/src/stories/common/PullDown.stories.tsx @@ -0,0 +1,19 @@ +import { Meta } from '@storybook/react'; +import { PullDown } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/PullDown', + component: PullDown, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + placeholder: 'placeholder', + value: 'value', + children: 'children', + }, +}; diff --git a/view/next-project/src/stories/common/SearchSelect.stories.tsx b/view/next-project/src/stories/common/SearchSelect.stories.tsx new file mode 100644 index 000000000..83b9d0875 --- /dev/null +++ b/view/next-project/src/stories/common/SearchSelect.stories.tsx @@ -0,0 +1,29 @@ +import { Meta } from '@storybook/react'; +import { SearchSelect } from '@components/common'; + +const meta: Meta = { + 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', + }, +}; diff --git a/view/next-project/src/stories/common/Tooltip.stories.tsx b/view/next-project/src/stories/common/Tooltip.stories.tsx new file mode 100644 index 000000000..5bc21ad2a --- /dev/null +++ b/view/next-project/src/stories/common/Tooltip.stories.tsx @@ -0,0 +1,19 @@ +import { Meta } from '@storybook/react'; +import { Tooltip } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/Tooltip', + component: Tooltip, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children: 'children', + text: '説明文', + }, +}; diff --git a/view/next-project/src/stories/common/UnderlinePrimaryButton.stories.tsx b/view/next-project/src/stories/common/UnderlinePrimaryButton.stories.tsx new file mode 100644 index 000000000..e7c9c435a --- /dev/null +++ b/view/next-project/src/stories/common/UnderlinePrimaryButton.stories.tsx @@ -0,0 +1,18 @@ +import { Meta } from '@storybook/react'; +import { UnderlinePrimaryButton } from '@components/common'; + +const meta: Meta = { + title: 'FinanSu/common/UnderlinePrimaryButton', + component: UnderlinePrimaryButton, + tags: ['autodocs'], + argTypes: {}, +}; + +export default meta; + +export const Primary = { + args: { + className: 'm-10', + children:

children

, + }, +};