Skip to content

Commit

Permalink
chore : 공유-컴포넌트-버튼-border-radius-속성-추가 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangminguu authored Oct 29, 2024
1 parent 7264e9f commit 0566f3f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// src/shared/ui/Button/Button.stories.tsx
import type { Meta, StoryObj } from '@storybook/react';
import Button from './Button';

Expand All @@ -16,6 +15,7 @@ export const Default: Story = {
children: '로그인',
isActive: true,
hasBorder: false,
borderradius: '10px',
height: '44px',
width: '300px',
fontSize: '16px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const StyledButton = styled.button.withConfig({
font-family: 'Pretendard', sans-serif;
height: ${(props) => props.height};
width: ${(props) => props.width};
border-radius: 10px;
border-radius: ${(props) => props.borderradius};
transition: background-color 0.2s ease;
&:hover {
Expand Down
2 changes: 2 additions & 0 deletions src/shared/ui/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Button = ({
children,
isActive = true,
hasBorder = false,
borderradius = '10px',
height,
width,
fontSize,
Expand All @@ -15,6 +16,7 @@ const Button = ({
<StyledButton
isActive={isActive}
hasBorder={hasBorder}
borderradius={borderradius}
height={height}
width={width}
fontSize={fontSize}
Expand Down
5 changes: 3 additions & 2 deletions src/shared/ui/Button/Button.types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export interface ButtonProps {
children: React.ReactNode;
fontSize: string;
isActive: boolean;
hasBorder: boolean;
isActive?: boolean;
hasBorder?: boolean;
borderradius?: string;
height: string;
width: string;
onClick: () => void;
Expand Down

0 comments on commit 0566f3f

Please sign in to comment.