-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
황 태환
committed
Feb 26, 2024
1 parent
a82a1a7
commit 8950bcd
Showing
3 changed files
with
28 additions
and
7 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ const preview: Preview = { | |
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
expanded: true, | ||
}, | ||
}, | ||
}; | ||
|
31 changes: 26 additions & 5 deletions
31
src/components/create-character/stories/cta-button.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 |
---|---|---|
@@ -1,16 +1,37 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import CtaButton from '@/components/ui/cta-button'; | ||
import { PageContainer } from '@/components/ui'; | ||
import FixedBottomArea from '@/components/fixed-bottom-area'; | ||
|
||
export default { | ||
title: 'Components/CtaButton', // story 이름 | ||
component: CtaButton, | ||
} as Meta<typeof CtaButton>; | ||
|
||
type Story = StoryObj<typeof CtaButton>; | ||
|
||
const args = { | ||
text: '테스트', | ||
disabled: false, | ||
}; | ||
const argTypes = { | ||
text: { description: '버튼의 텍스트', control: 'text' }, | ||
disabled: { description: '버튼의 활성화 여부', control: 'boolean' }, | ||
}; | ||
|
||
export const Basic: Story = { | ||
argTypes: { | ||
text: { control: 'text' }, | ||
disabled: { control: 'boolean' }, | ||
}, | ||
render: (props) => <CtaButton {...props} />, | ||
args, | ||
argTypes, | ||
render: (args) => <CtaButton {...args} className="mb-[31px]" />, | ||
}; | ||
export const BottomFixed: Story = { | ||
args, | ||
argTypes, | ||
render: (props) => ( | ||
<PageContainer> | ||
<FixedBottomArea> | ||
<CtaButton {...props} className="mb-[31px]" /> | ||
</FixedBottomArea> | ||
</PageContainer> | ||
), | ||
}; |
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