From ed17859f535e617573648a9d32468ff9363c1531 Mon Sep 17 00:00:00 2001 From: "(hoooooony)" <(cjh41820@gmail.com)> Date: Mon, 27 Nov 2023 16:36:13 +0900 Subject: [PATCH 01/39] =?UTF-8?q?feat:=20=EA=B0=80=EA=B2=A9=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B2=84=ED=8A=BC=20=EB=8F=99=EC=9E=91=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MenuPrice/MenuPrice.module.scss | 83 ++++++++++++------- .../AddMenu/components/MenuPrice/index.tsx | 79 +++++++++++++----- 2 files changed, 113 insertions(+), 49 deletions(-) diff --git a/src/page/AddMenu/components/MenuPrice/MenuPrice.module.scss b/src/page/AddMenu/components/MenuPrice/MenuPrice.module.scss index 0e5e1e44..63f4c578 100644 --- a/src/page/AddMenu/components/MenuPrice/MenuPrice.module.scss +++ b/src/page/AddMenu/components/MenuPrice/MenuPrice.module.scss @@ -44,17 +44,18 @@ &__price-info-input-box { margin-top: 10px; display: flex; + justify-content: space-between; align-items: center; gap: 4px; } &__price-info-inputs { display: flex; + width: 100%; align-items: center; gap: 8px; - width: 100%; - input { + &__size-input { width: 100%; height: 35px; border: 0.5px solid #898a8d; @@ -67,21 +68,33 @@ font-weight: 400; } } - } - &__price-input-box { - position: relative; - width: 100%; + &__price-input-box { + position: relative; + width: 100%; + } + + &__price-input { + width: 100%; + height: 35px; + border: 0.5px solid #898a8d; + padding: 8px; + box-sizing: border-box; + } + + &__price-input-won { + box-sizing: border-box; + position: absolute; + right: 8px; + top: 32%; + color: #a1a1a1; + font-size: 13px; + font-weight: 400; + } } - &__price-input-won { - box-sizing: border-box; - position: absolute; - right: 8px; - top: 32%; - color: #a1a1a1; - font-size: 13px; - font-weight: 400; + &__cancle-button { + background-color: white; } &__cancle-icon { @@ -99,6 +112,7 @@ align-items: center; margin-top: 16px; gap: 8px; + background-color: white; &__icon { width: 12px; @@ -161,13 +175,19 @@ } } -.price-info-inputs { +.price-info-input-box { margin-top: 24px; display: flex; gap: 16px; align-items: center; +} - .size-input { +.price-info-inputs { + display: flex; + gap: 16px; + align-items: center; + + &__size-input { box-sizing: border-box; width: 335px; height: 62px; @@ -184,16 +204,16 @@ font-weight: 400; } } -} -.prcie-input-box { - position: relative; - box-sizing: border-box; - width: 335px; - height: 62px; - border: 0.5px solid #858585; + &__price-input-box { + position: relative; + box-sizing: border-box; + width: 335px; + height: 62px; + border: 0.5px solid #858585; + } - .price-input { + &__price-input { text-align: right; box-sizing: border-box; width: 303px; @@ -206,7 +226,7 @@ outline: none; } - .price-input-won { + &__price-input-won { position: absolute; top: 32%; right: 10px; @@ -216,12 +236,18 @@ } } -.cancle-icon { +.cancle-button { width: 24px; height: 24px; + background-color: white; - &:hover { - cursor: pointer; + &__icon { + width: 24px; + height: 24px; + + &:hover { + cursor: pointer; + } } } @@ -232,6 +258,7 @@ gap: 8px; height: 28px; width: 107px; + background-color: white; &__icon { width: 24px; diff --git a/src/page/AddMenu/components/MenuPrice/index.tsx b/src/page/AddMenu/components/MenuPrice/index.tsx index d259c577..718e285e 100644 --- a/src/page/AddMenu/components/MenuPrice/index.tsx +++ b/src/page/AddMenu/components/MenuPrice/index.tsx @@ -1,12 +1,23 @@ import useMediaQuery from 'utils/hooks/useMediaQuery'; +import { useState } from 'react'; import { ReactComponent as PlusIcon } from 'assets/svg/main/plus.svg'; -import { ReactComponent as CancleIcon } from 'assets/svg/mystore/x-in-circle-cancle.svg'; +import { ReactComponent as DeleteIcon } from 'assets/svg/addmenu/delete-icon.svg'; +import { ReactComponent as MobileDeleteIcon } from 'assets/svg/addmenu/mobile-delete-icon.svg'; import { ReactComponent as CheckCircleIcon } from 'assets/svg/mystore/check-circle.svg'; import { ReactComponent as MobilePlusIcon } from 'assets/svg/addmenu/mobile-plus-icon.svg'; import styles from './MenuPrice.module.scss'; export default function MenuPrice() { const { isMobile } = useMediaQuery(); + const [priceInputs, setPriceInputs] = useState([{ id: 1 }]); + + const addPriceInput = () => { + setPriceInputs([...priceInputs, { id: priceInputs.length + 1 }]); + }; + const deletePriceInput = (id : number) => { + setPriceInputs(priceInputs.filter((input) => input.id !== id)); + }; + return (
원
+원
+원
+ {isComplete ? ( + <> +원
+원
+ {isComplete ? ( + <> +원
+