From f525dff1044f15cace3d2249d5fc830a0207acfd Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 15:55:17 +0900 Subject: [PATCH 01/11] =?UTF-8?q?[BUILD]=20tailwind-merge=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=84=A4=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/package.json b/package.json index 0e2b0951..12aa97ff 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "react-router-dom": "^7.11.0", "react-spinners": "^0.17.0", "swiper": "^12.0.3", + "tailwind-merge": "^3.5.0", "tailwindcss": "^4.1.18", "zod": "^4.2.1", "zustand": "^5.0.10" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 252c0a76..fd459834 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ importers: swiper: specifier: ^12.0.3 version: 12.0.3 + tailwind-merge: + specifier: ^3.5.0 + version: 3.5.0 tailwindcss: specifier: ^4.1.18 version: 4.1.18 @@ -1539,6 +1542,9 @@ packages: resolution: {integrity: sha512-BHd6U1VPEIksrXlyXjMmRWO0onmdNPaTAFduzqR3pgjvi7KfmUCAm/0cj49u2D7B0zNjMw02TSeXfinC1hDCXg==} engines: {node: '>= 4.7.0'} + tailwind-merge@3.5.0: + resolution: {integrity: sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==} + tailwindcss@4.1.18: resolution: {integrity: sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==} @@ -3005,6 +3011,8 @@ snapshots: swiper@12.0.3: {} + tailwind-merge@3.5.0: {} + tailwindcss@4.1.18: {} tapable@2.3.0: {} From d638896383809a9fe5c695af2b7ae13c8549ae70 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 15:56:01 +0900 Subject: [PATCH 02/11] =?UTF-8?q?[REFACTOR]=20=EC=9E=AC=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=84=B1=EC=9D=84=20=EB=86=92=EC=9D=80=20=EA=B3=B5=EC=9A=A9?= =?UTF-8?q?=EB=B2=84=ED=8A=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Button.tsx | 55 ++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/components/common/Button.tsx b/src/components/common/Button.tsx index cc64eaf7..f6fac2a8 100644 --- a/src/components/common/Button.tsx +++ b/src/components/common/Button.tsx @@ -1,30 +1,53 @@ -import Pencil from "../../assets/icons/pencil-primary-500.svg"; +import type { ReactElement } from "react"; +import { twMerge } from "tailwind-merge"; -interface ButtonProps { - onClick?: () => void; - text: string; - type: "button" | "submit" | "reset"; +interface ButtonType { + children: ReactElement | string; + size: "Btn_L" | "Btn_M" | "Btn_S"; + variant: "primary" | "gray" | "transparent"; disabled?: boolean; - bgColor?: "primary" | "white"; + onClick?: () => void; + type?: "button" | "submit" | "reset"; + className: string; } -export default function Button({ +const sizes = { + Btn_L: "px-[10px] py-[16px]", + Btn_S: "px-[24px] py-[6px]", + Btn_M: "px-[10px] py-[16px]", // padding을 className에 직접 지정 가능 +}; + +const variants = { + primary: "bg-primary-700 text-white", + gray: "bg-gray-100", + transparent: "bg-transparent border-1 border-primary-700", +}; + +const Button = ({ + children = "", + size = "Btn_M", + variant = "primary", + disabled = false, onClick, - text, type, - disabled, - bgColor = "primary", -}: ButtonProps) { + className, +}: ButtonType) => { + const sizeClass = sizes[size]; + const variantClass = variants[variant]; + const disabledClass = disabled && "opacity-50 cursor-not-allowed"; + return ( ); -} +}; + +export default Button; From 755274c49643f4b7bd4328c76850906586a8ca7d Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 15:56:48 +0900 Subject: [PATCH 03/11] =?UTF-8?q?[MODIFY]=20=EB=B0=94=EB=80=90=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=20=EB=A7=9E=EC=B6=B0=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/meal-plan/BottomSheet.tsx | 17 +++++++-------- src/components/meal-plan/ReviewModal.tsx | 18 ++++++---------- src/components/meal-plan/TodayMeal.tsx | 23 ++++++++------------- src/components/mypage/GetDateRangeModal.tsx | 22 ++++++++++++++++++-- src/components/onboarding/ThirdStep.tsx | 12 ++++++----- src/components/profile/ProfileDataForm.tsx | 12 ++++++++--- src/pages/auth/terms-agreement-page.tsx | 12 +++++++---- src/pages/family/allergies-search-page.tsx | 10 ++++++++- src/pages/family/family-create-page.tsx | 10 ++++++--- src/pages/family/family-invite-page.tsx | 10 ++++++--- 10 files changed, 90 insertions(+), 56 deletions(-) diff --git a/src/components/meal-plan/BottomSheet.tsx b/src/components/meal-plan/BottomSheet.tsx index 1a1590ef..06e02a96 100644 --- a/src/components/meal-plan/BottomSheet.tsx +++ b/src/components/meal-plan/BottomSheet.tsx @@ -215,16 +215,15 @@ export default function BottomSheet({
); diff --git a/src/components/meal-plan/ReviewModal.tsx b/src/components/meal-plan/ReviewModal.tsx index 17c05ab5..4cb2499e 100644 --- a/src/components/meal-plan/ReviewModal.tsx +++ b/src/components/meal-plan/ReviewModal.tsx @@ -113,19 +113,13 @@ export default function ReviewModal({
diff --git a/src/components/meal-plan/TodayMeal.tsx b/src/components/meal-plan/TodayMeal.tsx index 962f3840..07da486e 100644 --- a/src/components/meal-plan/TodayMeal.tsx +++ b/src/components/meal-plan/TodayMeal.tsx @@ -38,20 +38,15 @@ export default function TodayMeal({ data }: { data: TodayMeal }) { {!data.isReviewed && (
- {!isDone ? ( -
)}
diff --git a/src/components/mypage/GetDateRangeModal.tsx b/src/components/mypage/GetDateRangeModal.tsx index ac06065b..9ca4a28d 100644 --- a/src/components/mypage/GetDateRangeModal.tsx +++ b/src/components/mypage/GetDateRangeModal.tsx @@ -143,7 +143,15 @@ export default function GetDateRangeModal({
-
@@ -163,7 +171,17 @@ export default function GetDateRangeModal({ onSelect={handleSelect} />
-
diff --git a/src/components/onboarding/ThirdStep.tsx b/src/components/onboarding/ThirdStep.tsx index 38ae8325..eafb3685 100644 --- a/src/components/onboarding/ThirdStep.tsx +++ b/src/components/onboarding/ThirdStep.tsx @@ -24,12 +24,14 @@ export default function ThirdStep() {
diff --git a/src/components/profile/ProfileDataForm.tsx b/src/components/profile/ProfileDataForm.tsx index 804ffd4f..3fbb5162 100644 --- a/src/components/profile/ProfileDataForm.tsx +++ b/src/components/profile/ProfileDataForm.tsx @@ -256,10 +256,16 @@ export default function ProfileDataForm({
); diff --git a/src/pages/auth/terms-agreement-page.tsx b/src/pages/auth/terms-agreement-page.tsx index b3cb5ae0..8ebd16e6 100644 --- a/src/pages/auth/terms-agreement-page.tsx +++ b/src/pages/auth/terms-agreement-page.tsx @@ -122,13 +122,17 @@ export default function TermsAgreementPage() { /> -
+
); diff --git a/src/pages/family/allergies-search-page.tsx b/src/pages/family/allergies-search-page.tsx index 6a9a5663..dd8100a2 100644 --- a/src/pages/family/allergies-search-page.tsx +++ b/src/pages/family/allergies-search-page.tsx @@ -60,7 +60,15 @@ export default function AllergiesSearchPage() {
-
diff --git a/src/pages/family/family-create-page.tsx b/src/pages/family/family-create-page.tsx index 736cb7cf..44789b60 100644 --- a/src/pages/family/family-create-page.tsx +++ b/src/pages/family/family-create-page.tsx @@ -120,11 +120,15 @@ export default function FamilyCreatePage() {
diff --git a/src/pages/family/family-invite-page.tsx b/src/pages/family/family-invite-page.tsx index 2e29d871..f66d663d 100644 --- a/src/pages/family/family-invite-page.tsx +++ b/src/pages/family/family-invite-page.tsx @@ -103,13 +103,17 @@ export default function FamilyInvitePage() {
From 18dd1dfba2da605af63b6af69a4d68d7c4958e29 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 16:11:13 +0900 Subject: [PATCH 04/11] =?UTF-8?q?[BUGFIX]=20=EC=88=98=EC=A0=95=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=97=90=20handleChange=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/meal-plan/BottomSheet.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/meal-plan/BottomSheet.tsx b/src/components/meal-plan/BottomSheet.tsx index 06e02a96..f579b511 100644 --- a/src/components/meal-plan/BottomSheet.tsx +++ b/src/components/meal-plan/BottomSheet.tsx @@ -219,6 +219,7 @@ export default function BottomSheet({ variant="primary" type="button" className="w-[343px]" + onClick={handleChange} > {isOpen ? "바꾸기" : "수정완료"} From c6e7b7d62628cc85fb1c42267a9847b95df38503 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 16:15:36 +0900 Subject: [PATCH 05/11] =?UTF-8?q?[BUGFIX]=20=EB=B2=84=ED=8A=BC=EC=97=90=20?= =?UTF-8?q?onClick=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/meal-plan/ReviewModal.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/meal-plan/ReviewModal.tsx b/src/components/meal-plan/ReviewModal.tsx index 4cb2499e..aa18d75b 100644 --- a/src/components/meal-plan/ReviewModal.tsx +++ b/src/components/meal-plan/ReviewModal.tsx @@ -117,6 +117,16 @@ export default function ReviewModal({ variant="primary" type="button" className="w-[343px]" + onClick={() => { + const reviewData: createReview = { + recipeId, + score, + }; + if (preference !== null) { + reviewData.isFavorite = preference; + } + handleSubmitReview(reviewData); + }} > 등록 From 6abdf554e67c9124b8a48258efaeecd23736eeb5 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 16:20:00 +0900 Subject: [PATCH 06/11] =?UTF-8?q?[BUGFIX]=20=EC=83=88=EB=A1=9C=20=EB=A7=8C?= =?UTF-8?q?=EB=93=A0=20Button=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/meal-plan/meal-plan-create-page.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/meal-plan/meal-plan-create-page.tsx b/src/pages/meal-plan/meal-plan-create-page.tsx index ade4b673..6a2551fc 100644 --- a/src/pages/meal-plan/meal-plan-create-page.tsx +++ b/src/pages/meal-plan/meal-plan-create-page.tsx @@ -105,10 +105,16 @@ const MealPlanCreatePage = () => {
From f8b6c977db14a65bad2a6271920bfed390fbdffc Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 16:22:20 +0900 Subject: [PATCH 07/11] =?UTF-8?q?[MODIFY]=20=EC=BD=94=EB=93=9C=EC=BB=A8?= =?UTF-8?q?=EB=B2=A4=EC=85=98=EC=97=90=20=EB=A7=9E=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=83=81=EC=88=98=20=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Button.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/common/Button.tsx b/src/components/common/Button.tsx index f6fac2a8..06cfd4ff 100644 --- a/src/components/common/Button.tsx +++ b/src/components/common/Button.tsx @@ -11,13 +11,12 @@ interface ButtonType { className: string; } -const sizes = { +const SIZES = { Btn_L: "px-[10px] py-[16px]", Btn_S: "px-[24px] py-[6px]", Btn_M: "px-[10px] py-[16px]", // padding을 className에 직접 지정 가능 }; - -const variants = { +const VARIANTS = { primary: "bg-primary-700 text-white", gray: "bg-gray-100", transparent: "bg-transparent border-1 border-primary-700", @@ -32,8 +31,8 @@ const Button = ({ type, className, }: ButtonType) => { - const sizeClass = sizes[size]; - const variantClass = variants[variant]; + const sizeClass = SIZES[size]; + const variantClass = VARIANTS[variant]; const disabledClass = disabled && "opacity-50 cursor-not-allowed"; return ( From 97511d6d052bcabc43c601b67ddafc9ef8b4ad46 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 16:24:22 +0900 Subject: [PATCH 08/11] =?UTF-8?q?[BUGFIX]=20type=20=3D=20submit=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/profile/ProfileDataForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/profile/ProfileDataForm.tsx b/src/components/profile/ProfileDataForm.tsx index 3fbb5162..e878d405 100644 --- a/src/components/profile/ProfileDataForm.tsx +++ b/src/components/profile/ProfileDataForm.tsx @@ -258,7 +258,7 @@ export default function ProfileDataForm({ - ); -}; - +const Button = forwardRef( + ( + { children, size = "Btn_M", variant = "primary", className, ...props }, + ref, + ) => { + const sizeClass = SIZES[size]; + const variantClass = VARIANTS[variant]; + const disabledClass = props.disabled ? "opacity-50 cursor-not-allowed" : ""; + return ( + + ); + }, +); +Button.displayName = "Button"; export default Button; From 6da04c65828315cb739b0bd8493d305dc76dd788 Mon Sep 17 00:00:00 2001 From: jangmk05 Date: Sat, 28 Feb 2026 22:59:23 +0900 Subject: [PATCH 10/11] =?UTF-8?q?[REFACTOR]=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Button.tsx | 6 +++--- src/pages/meal-plan/meal-plan-create-page.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/common/Button.tsx b/src/components/common/Button.tsx index 8bd29172..5ada00a1 100644 --- a/src/components/common/Button.tsx +++ b/src/components/common/Button.tsx @@ -3,8 +3,8 @@ import { twMerge } from "tailwind-merge"; interface ButtonType extends ButtonHTMLAttributes { children: ReactNode; - size: "Btn_L" | "Btn_M" | "Btn_S"; - variant: "primary" | "gray" | "transparent"; + size?: "Btn_L" | "Btn_M" | "Btn_S"; + variant?: "primary" | "gray" | "transparent"; } const SIZES = { @@ -20,7 +20,7 @@ const VARIANTS = { const Button = forwardRef( ( - { children, size = "Btn_M", variant = "primary", className, ...props }, + { children, size = "Btn_L", variant = "primary", className, ...props }, ref, ) => { const sizeClass = SIZES[size]; diff --git a/src/pages/meal-plan/meal-plan-create-page.tsx b/src/pages/meal-plan/meal-plan-create-page.tsx index 6a2551fc..5132ac7a 100644 --- a/src/pages/meal-plan/meal-plan-create-page.tsx +++ b/src/pages/meal-plan/meal-plan-create-page.tsx @@ -109,7 +109,7 @@ const MealPlanCreatePage = () => { variant="primary" type="button" className="w-[343px]" - onClick={() => handleCreate()} + onClick={handleCreate} > 식단 생성 From 6cc7e8363a7f79ae8209fbd12294325de8a47a00 Mon Sep 17 00:00:00 2001 From: shooukie Date: Wed, 25 Mar 2026 22:58:47 +0900 Subject: [PATCH 11/11] =?UTF-8?q?[MERGE]=20=EB=A8=B8=EC=A7=80=20=EC=B6=A9?= =?UTF-8?q?=EB=8F=8C=20=ED=95=B4=EA=B2=B0(=EB=B3=80=EA=B2=BD=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EC=A0=81=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/meal-plan/meal-plan-edit-page.tsx | 18 ++++++------ src/pages/meal-plan/meal-plan-page.tsx | 31 ++++++++++----------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/pages/meal-plan/meal-plan-edit-page.tsx b/src/pages/meal-plan/meal-plan-edit-page.tsx index ef32a924..3e80e29e 100644 --- a/src/pages/meal-plan/meal-plan-edit-page.tsx +++ b/src/pages/meal-plan/meal-plan-edit-page.tsx @@ -424,16 +424,16 @@ function BottomSheet({
); diff --git a/src/pages/meal-plan/meal-plan-page.tsx b/src/pages/meal-plan/meal-plan-page.tsx index 6771c004..514b796f 100644 --- a/src/pages/meal-plan/meal-plan-page.tsx +++ b/src/pages/meal-plan/meal-plan-page.tsx @@ -171,20 +171,15 @@ function TodayMealTab({ data }: { data: TodayMeal }) { {!data.isReviewed && (
- {!isDone ? ( -
)}
@@ -409,8 +404,10 @@ function ReviewModal({ recipeId, onClick, type }: ReviewModalProps) {