diff --git a/packages/ui/lib/Button/Button.module.scss b/packages/ui/lib/Button/Button.module.scss index dd7a6b3..893c098 100644 --- a/packages/ui/lib/Button/Button.module.scss +++ b/packages/ui/lib/Button/Button.module.scss @@ -1,3 +1,4 @@ +@use '../variables' as *; .base { background-color: var(--primary-color); color: white; @@ -8,15 +9,7 @@ font-size: 16px; font-weight: 400; transition: all 0.15s ease-in-out; - &.shadow { - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); - &:hover { - box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); - } - &:active { - box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); - } - } + @include shadow; &:hover { backdrop-filter: brightness(0.85); } @@ -31,8 +24,13 @@ color: var(--primary-color); border: 1px solid var(--primary-color); } - &.tertiary { - background-color: #f6f6f6; + &.ghost { + &:hover { + // background-color: #ffffffc4; + filter: brightness(1); + backdrop-filter: brightness(0.97); + } + background-color: transparent; color: var(--primary-color); font-weight: 600; } diff --git a/packages/ui/lib/Button/Button.stories.ts b/packages/ui/lib/Button/Button.stories.ts index b244fe7..97550c5 100644 --- a/packages/ui/lib/Button/Button.stories.ts +++ b/packages/ui/lib/Button/Button.stories.ts @@ -12,13 +12,17 @@ const meta = { tags: ['autodocs'], argTypes: { color: { - options: ['primary', 'secondary', 'tertiary', 'danger'], + options: ['primary', 'secondary', 'ghost', 'danger'], control: { type: 'select' }, }, size: { options: ['small', 'medium', 'large'], control: { type: 'select' }, }, + shadow: { + options: ['regular', 'small', 'medium', 'large', 'extraLarge', 'inner', 'none'], + control: { type: 'select' }, + }, }, } satisfies Meta; @@ -29,7 +33,6 @@ type Story = StoryObj; const defaultProps: ButtonProps = { color: 'primary', size: 'medium', - isShadow: false, }; export const DefaultButton: Story = { diff --git a/packages/ui/lib/Button/Button.tsx b/packages/ui/lib/Button/Button.tsx index bac347f..b54a2d8 100644 --- a/packages/ui/lib/Button/Button.tsx +++ b/packages/ui/lib/Button/Button.tsx @@ -6,31 +6,29 @@ export interface ButtonProps extends React.ButtonHTMLAttributes( - ({ color = 'primary', size = 'medium', disabled = false, isShadow = false, ...rest }, ref) => { + ({ color = 'primary', shadow = 'none', size = 'medium', disabled = false, ...rest }, ref) => { const btnClass = classnames( styles['base'], styles[color], styles[size], styles[disabled ? 'disabled' : ''], - styles[isShadow ? 'shadow' : ''], + styles[`shadow-${shadow}`], ); return (