-
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]DeleteModal.stories EditModal OpenAddModalButton OpenDeleteModal…
…Button OpenEditModalButton SponsorStyleAddModal
- Loading branch information
1 parent
330a5e6
commit 40c0a3e
Showing
13 changed files
with
151 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
view/next-project/src/components/sponsorstyles/DeleteModal.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
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
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,6 @@ | ||
export { default as DeleteModal } from './DeleteModal'; | ||
export { default as EditModal } from './EditModal'; | ||
export { default as OpenAddModalButton } from './OpenAddModalButton'; | ||
export { default as OpenDeleteModalButton } from './OpenDeleteModalButton'; | ||
export { default as OpenEditModalButton } from './OpenEditModalButton'; | ||
export { default as SponsorStyleAddModal } from './SponsorStyleAddModal'; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/sponsorstyles/DeleteModal.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 { DeleteModal } from '@components/sponsorstyles'; | ||
|
||
const meta: Meta<typeof DeleteModal> = { | ||
title: 'FinanSu/sponsorstyles/DeleteModal', | ||
component: DeleteModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
31 changes: 31 additions & 0 deletions
31
view/next-project/src/stories/sponsorstyles/EditModal.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,31 @@ | ||
import React, { useState } from 'react'; | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import EditModal from '@components/sponsorstyles/EditModal'; | ||
import { SponsorStyle } from '@type/common'; // SponsorStyle 型のインポートを確認してください | ||
|
||
const meta: Meta<typeof EditModal> = { | ||
title: 'FinanSu/sponsorstyles/EditModal', | ||
component: EditModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof EditModal> = (args) => { | ||
const [isOpen, setIsOpen] = useState(true); | ||
return <EditModal {...args} setIsOpen={setIsOpen} />; | ||
}; | ||
|
||
const sampleSponsorStyle: SponsorStyle = { | ||
id: 1, | ||
style: 'Premium', | ||
feature: 'Featured on homepage', | ||
price: 20000, | ||
}; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
sponsorStyleId: 123, | ||
sponsorStyle: sampleSponsorStyle, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/sponsorstyles/OpenAddModalButton.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 { OpenAddModalButton } from '@components/sponsorstyles'; | ||
|
||
const meta: Meta<typeof OpenAddModalButton> = { | ||
title: 'FinanSu/sponsorstyles/OpenAddModalButton', | ||
component: OpenAddModalButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
21 changes: 21 additions & 0 deletions
21
view/next-project/src/stories/sponsorstyles/OpenDeleteModalButton.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,21 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { OpenDeleteModalButton } from '@components/sponsorstyles'; | ||
import { Props } from '@components/sponsorstyles/OpenDeleteModalButton'; | ||
|
||
const meta: Meta<typeof OpenDeleteModalButton> = { | ||
title: 'FinanSu/sponsorstyles/OpenDeleteModalButton', | ||
component: OpenDeleteModalButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<Props> = (args) => <OpenDeleteModalButton {...args} />; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
31 changes: 31 additions & 0 deletions
31
view/next-project/src/stories/sponsorstyles/OpenEditModalButton.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,31 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { Props } from '@components/sponsorstyles/OpenEditModalButton'; | ||
import { OpenEditModalButton } from '@components/sponsorstyles'; | ||
import { SponsorStyle } from '@type/common'; | ||
|
||
// メタデータ定義 | ||
const meta: Meta<typeof OpenEditModalButton> = { | ||
title: 'FinanSu/sponsorstyles/OpenEditModalButton', | ||
component: OpenEditModalButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
// 仮のSponsorStyleデータ | ||
const sampleSponsorStyle: SponsorStyle = { | ||
id: 1, | ||
style: 'Sample Style', | ||
feature: 'Sample Feature', | ||
price: 1000, | ||
}; | ||
|
||
const Template: StoryFn<Props> = (args) => <OpenEditModalButton {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
id: 1, | ||
sponsorStyle: sampleSponsorStyle, | ||
children: <h1>Sample Child</h1>, | ||
}; |
20 changes: 20 additions & 0 deletions
20
view/next-project/src/stories/sponsorstyles/SponsorStyleAddModal.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,20 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import React from 'react'; | ||
import { SponsorStyleAddModal } from '@components/sponsorstyles'; | ||
|
||
const meta: Meta = { | ||
title: 'FinanSu/sponsorstyles/SponsorStyleAddModal', | ||
component: SponsorStyleAddModal, | ||
argTypes: {}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof SponsorStyleAddModal> = (args) => ( | ||
<SponsorStyleAddModal {...args} /> | ||
); | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
}; |