Skip to content

Commit d7d202e

Browse files
committed
[style]root 텍스트컬러 및 bg 변경, Button컴포넌트 props명 변경
1 parent 6617264 commit d7d202e

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

src/app/design-system/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

3-
import Button from '@/shared/components/Button';
3+
import Button from '@/shared/components/button/Button';
4+
import TextButton from '@/shared/components/button/TextButton';
45
import ConfirmPop from '@/shared/components/ModalPop/ConfirmPop';
56
import ModalLayout from '@/shared/components/ModalPop/ModalLayout';
67
import { useState } from 'react';
@@ -44,14 +45,14 @@ function Page() {
4445
<div className="space-y-2">
4546
<h3 className="text-xl font-medium border-b pb-1">Button</h3>
4647
<Button type="button">버튼</Button>
47-
<Button variant="purple" type="button">
48+
<Button color="purple" type="button">
4849
Button
4950
</Button>
5051
<Button disabled>button</Button>
5152
<Button type="button" size="sm">
5253
버튼
5354
</Button>
54-
<Button type="button" size="sm" variant="purple">
55+
<Button type="button" size="sm" color="purple">
5556
버튼
5657
</Button>
5758
<Button size="sm" disabled>

src/shared/components/button/Button.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ButtonHTMLAttributes, Ref } from 'react';
1010

1111
interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
1212
size?: 'default' | 'sm';
13-
variant?: 'default' | 'purple';
13+
color?: 'default' | 'purple';
1414
ref?: Ref<HTMLButtonElement | null>;
1515
disable?: boolean;
1616
type?: 'submit' | 'button';
@@ -20,21 +20,21 @@ interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
2020

2121
export const ButtonClass = cva(
2222
`
23-
py-1 px-2 rounded-lg text-base font-bold flex-center text-bold text-navy duration-300 disabled:bg-gray disabled:cursor-not-allowed
23+
py-1 px-2 rounded-lg text-base font-bold flex-center text-bold text-navy duration-300 disabled:bg-gray disabled:cursor-not-allowed disabled:text-primary
2424
`,
2525
{
2626
variants: {
27-
variant: {
28-
default: 'bg-secondary text-navy hover:inset-shadow-black',
29-
purple: 'bg-tertiary text-secondary hover:inset-shadow-white',
27+
color: {
28+
default: 'bg-secondary text-navy enabled:hover:inset-shadow-black',
29+
purple: 'bg-tertiary text-secondary enabled:hover:inset-shadow-white',
3030
},
3131
size: {
3232
default: 'h-10, min-w-25',
3333
sm: 'h-8 min-w-20',
3434
},
3535
},
3636
defaultVariants: {
37-
variant: 'default',
37+
color: 'default',
3838
size: 'default',
3939
},
4040
}
@@ -43,7 +43,7 @@ export const ButtonClass = cva(
4343
function Button({
4444
size,
4545
type = 'button',
46-
variant,
46+
color,
4747
children,
4848
className,
4949
ref,
@@ -52,7 +52,7 @@ function Button({
5252
}: Props) {
5353
return (
5454
<button
55-
className={tw(ButtonClass({ variant, size, className }))}
55+
className={tw(ButtonClass({ color, size, className }))}
5656
type={type}
5757
ref={ref}
5858
disabled={disabled}

src/shared/styles/_theme.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
--font-serif: 'Hahmlet', serif;
1818

1919
--inset-shadow-black: inset 0 2px 6px rgba(0, 0, 0, 0.3);
20-
--inset-shadow-white: inset 0 0 8px rgba(255, 255, 255, 0.8);
20+
--inset-shadow-white: inset 0 0 8px rgba(255, 255, 255, 0.4);
2121

2222
}

src/shared/styles/global.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
'NanumSquareNeo',sans-serif;
1313
line-height: 1.5;
1414
font-weight: 500;
15+
color:#fff;
16+
background-color: var(--color-primary)
1517
}
1618

0 commit comments

Comments
 (0)