-
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.
Browse files
Browse the repository at this point in the history
* feat: BottomActionButton 컴포넌트 작성 * feat: BottomActionButton 컴포넌트 스토리 작성 * refactor: 만들어진 Button을 사용하도록 수정 * style: Button이 Stretch 되도록 size prop 전달
- Loading branch information
1 parent
b8c9d77
commit 2648684
Showing
2 changed files
with
50 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,28 @@ | ||
import BottomActionButton from '@/ui/Base/BottomActionButton'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
const meta: Meta<typeof BottomActionButton> = { | ||
title: 'Base/BottomActionButton', | ||
component: BottomActionButton, | ||
tags: ['autodocs'], | ||
parameters: { | ||
docs: { | ||
story: { | ||
inline: false, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof BottomActionButton>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
render: () => ( | ||
<BottomActionButton onClick={() => alert('click!')}> | ||
다음 | ||
</BottomActionButton> | ||
), | ||
}; |
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,22 @@ | ||
import { ComponentPropsWithoutRef } from 'react'; | ||
import Button from './Button'; | ||
|
||
type BottomActionButtonProps = Omit< | ||
ComponentPropsWithoutRef<'button'>, | ||
'className' | ||
>; | ||
|
||
const BottomActionButton = ({ | ||
children, | ||
...props | ||
}: BottomActionButtonProps) => { | ||
return ( | ||
<div className="fixed bottom-0 left-0 z-10 w-full bg-white px-[2.0rem] py-[1.5rem]"> | ||
<Button size="full" {...props}> | ||
{children} | ||
</Button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BottomActionButton; |