Skip to content

Commit

Permalink
refactor(Button): 'variant' 이름 변경 (default > contained>
Browse files Browse the repository at this point in the history
  • Loading branch information
vi-wolhwa committed Jul 23, 2024
1 parent 00bfc9a commit 4a94100
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const ButtonGroup = ({ disabled }: { disabled: boolean }) => (
<div css={colStyle}>
<div css={rowStyle}>
<div css={buttonWrapper}>
<Button variant='default' size='small' disabled={disabled}>
<Button variant='contained' size='small' disabled={disabled}>
버튼
</Button>
</div>
<div css={buttonWrapper}>
<Button variant='default' size='medium' disabled={disabled}>
<Button variant='contained' size='medium' disabled={disabled}>
버튼
</Button>
</div>
Expand Down Expand Up @@ -75,7 +75,7 @@ export const Disabled: Story = {
export const CustomSized: Story = {
render: () => (
<div css={colStyle}>
<Button size='medium' variant='default' width='10rem'>
<Button size='medium' variant='contained' width='10rem'>
10rem
</Button>
<Button size='medium' variant='outlined' width='20rem'>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as S from './style';
export interface Props {
onClick?: (e?: React.MouseEvent<HTMLButtonElement>) => void;
type?: 'button' | 'submit' | 'reset';
variant: 'default' | 'outlined' | 'text';
variant: 'contained' | 'outlined' | 'text';
size: 'small' | 'medium';
width?: string;
disabled?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Button/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import type { Props } from './Button';

const variants = {
default: css`
contained: css`
color: rgb(52 60 72 / 100%);
background: rgb(255 211 105 / 100%);
`,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/UploadsTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const UploadsTemplate = () => {
<Button size='medium' variant='outlined' onClick={handleAddButtonClick}>
+ Add Snippet
</Button>
<Button size='medium' variant='default' onClick={handleSaveButtonClick} disabled={isLoading}>
<Button size='medium' variant='contained' onClick={handleSaveButtonClick} disabled={isLoading}>
Save
</Button>
</Flex>
Expand Down

0 comments on commit 4a94100

Please sign in to comment.