Skip to content

Commit 2500b1f

Browse files
committed
refactor: 중복되는 버튼 디자인 스타일 클래스로 분리
1 parent cee7499 commit 2500b1f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/ConfirmModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ const ConfirmModal = ({
3535
<section className="flex items-center gap-6">
3636
<button
3737
type="button"
38-
className="bg-primary-4 body-m h-10 flex-1 basis-1/2 rounded-lg text-gray-50"
38+
className="body-m secondary-btn h-10 flex-1 basis-1/2"
3939
onClick={onCancel}
4040
>
4141
{cancelText}
4242
</button>
4343
<button
4444
type="button"
45-
className="bg-primary-3 body-m h-10 flex-1 basis-1/2 rounded-lg text-black"
45+
className="primary-btn body-m h-10 flex-1 basis-1/2"
4646
onClick={onConfirm}
4747
>
4848
{confirmText}

src/styles/components.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
/* 재사용 가능한 UI 컴포넌트의 스타일 정의 */
22

33
@layer components {
4+
.primary-btn {
5+
@apply bg-primary-3 rounded-lg text-black;
6+
}
7+
8+
.secondary-btn {
9+
@apply bg-primary-4 rounded-lg text-gray-50;
10+
}
411
}

0 commit comments

Comments
 (0)