diff --git a/src/entities/common/model/constant.ts b/src/entities/common/model/constant.ts index df11c0a..01e899e 100644 --- a/src/entities/common/model/constant.ts +++ b/src/entities/common/model/constant.ts @@ -17,4 +17,12 @@ export const FilterMotionDuration = { export const FilterMotionStyle = { width: '100%', height: '100%' +}; + +export const BottomSheetMotionVaiants = { + hidden: { y: '100%' }, + visible: { y: '0%' }, +}; +export const BottomSheetMotionDuration = { + duration: 0.3 }; \ No newline at end of file diff --git a/src/entities/payment/model/types.ts b/src/entities/payment/model/types.ts index 61763a3..40cebf5 100644 --- a/src/entities/payment/model/types.ts +++ b/src/entities/payment/model/types.ts @@ -16,13 +16,6 @@ export enum DataNotificationNotifyContentKey { MobilePayment = 'MobilePayment', EscrowPayment = 'EscrowPayment', }; -export interface InfoItemProps { - type?: PaymentInfoItemType; - payName?: string; - payImage?: string; - infoLink?: string; -}; - export interface PaymentCommonParams { mid: string; }; diff --git a/src/entities/payment/ui/info-item.tsx b/src/entities/payment/ui/info-item.tsx index a92abb0..16fe907 100644 --- a/src/entities/payment/ui/info-item.tsx +++ b/src/entities/payment/ui/info-item.tsx @@ -1,13 +1,22 @@ -import { InfoItemProps } from '../model/types'; +import { PaymentInfoItemType } from '../model/types'; + +export interface InfoItemProps { + type?: PaymentInfoItemType; + payName?: string; + payImage?: string; + infoLink?: string; + setNoInterestInfoBottomSheetOn?: (noInterestInfoBottomSheetOn: boolean) => void; +}; export const InfoItem = ({ type, payName, payImage, - infoLink + infoLink, + setNoInterestInfoBottomSheetOn }: InfoItemProps) => { - const onClickToShow = () => { + const onClickToOpenBottomSheet = () => { if(!!infoLink){ } @@ -27,7 +36,7 @@ export const InfoItem = ({ diff --git a/src/entities/payment/ui/info-wrap.tsx b/src/entities/payment/ui/info-wrap.tsx index 4070b5e..fe35be2 100644 --- a/src/entities/payment/ui/info-wrap.tsx +++ b/src/entities/payment/ui/info-wrap.tsx @@ -1,6 +1,13 @@ -import { IMAGE_ROOT } from "@/shared/constants/common"; -import { InfoItem } from "./info-item"; -import { InfoItemProps, PaymentCardResponse, PaymentInfoItemType, PaymentInstallmentResponse, PaymentNonCardResponse } from "../model/types"; +import { IMAGE_ROOT } from '@/shared/constants/common'; +import { InfoItem } from './info-item'; +import { + PaymentCardResponse, + PaymentInfoItemType, + PaymentInstallmentResponse, + PaymentNonCardResponse +} from '../model/types'; +import { NoInterestInfoBottomSheet } from './no-interest-info-bottom-sheet'; +import { useState } from 'react'; export interface InfoWrapProp { paymentCard?: PaymentCardResponse, @@ -13,6 +20,7 @@ export const InfoWrap = ({ paymentInstallment }: InfoWrapProp) => { + const [noInterestInfoBottomSheetOn, setNoInterestInfoBottomSheetOn] = useState(false); const list1 = [ {payName: '신용카드', payImage: 'pay_01.svg', infoLink: ''}, @@ -70,6 +78,7 @@ export const InfoWrap = ({ payName={ list2[i]?.payName } payImage={ IMAGE_ROOT + '/' + list2[i]?.payImage } infoLink={ list2[i]?.infoLink } + setNoInterestInfoBottomSheetOn={ setNoInterestInfoBottomSheetOn } > ); } @@ -81,7 +90,7 @@ export const InfoWrap = ({ return ( <> -
+
서비스 이용, 수수료 및 정산주기
    { getList(PaymentInfoItemType.Comission) } @@ -92,7 +101,10 @@ export const InfoWrap = ({ { getList(PaymentInfoItemType.NoInterest) }
- + ); }; \ No newline at end of file diff --git a/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx b/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx index 5450700..618c226 100644 --- a/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx +++ b/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx @@ -1,11 +1,32 @@ +import { motion } from 'framer-motion'; import { IMAGE_ROOT } from '@/shared/constants/common'; +import { BottomSheetMotionVaiants, BottomSheetMotionDuration } from '@/entities/common/model/constant'; -export const NoInterestInfoBottomSheet = () => { +export interface NoInterestInfoBottomSheetProps { + noInterestInfoBottomSheetOn: boolean; + setNoInterestInfoBottomSheetOn: (noInterestInfoBottomSheetOn: boolean) => void; +}; - return ( +export const NoInterestInfoBottomSheet = ({ + noInterestInfoBottomSheetOn, + setNoInterestInfoBottomSheetOn +}: NoInterestInfoBottomSheetProps) => { + const onClickToClose = () => { + // close + setNoInterestInfoBottomSheetOn(false); + }; + return ( <> -
-
+ { noInterestInfoBottomSheetOn && +
+ } +

무이자 정보

@@ -16,6 +37,7 @@ export const NoInterestInfoBottomSheet = () => { 닫기 onClickToClose() } />
@@ -38,15 +60,7 @@ export const NoInterestInfoBottomSheet = () => {
적용기간 : 2025.06.01 ~ 9999.12.31
적용금액 : 50,000
- {/* -
- -
- */} -
+ ) }; \ No newline at end of file diff --git a/src/pages/payment/info/info-page.tsx b/src/pages/payment/info/info-page.tsx index 5577318..4926f96 100644 --- a/src/pages/payment/info/info-page.tsx +++ b/src/pages/payment/info/info-page.tsx @@ -79,7 +79,7 @@ export const InfoPage = () => { return ( <>
-
+