|
| 1 | +import Image from "next/image"; |
1 | 2 | import { overlay } from "overlay-kit"; |
2 | 3 | import { useEffect, useState } from "react"; |
3 | 4 |
|
4 | 5 | import { SearchStoreBottomSheet } from "@/app/(search)/_components/SearchStoreBottomSheet"; |
| 6 | +import InfoIcon from "@/assets/info.svg"; |
5 | 7 | import SearchIcon from "@/assets/search.svg"; |
| 8 | +import { BottomSheet } from "@/components/ui/BottomSheet"; |
6 | 9 | import { Button } from "@/components/ui/Button"; |
7 | 10 | import { Spacer } from "@/components/ui/Spacer"; |
8 | | -import { VStack } from "@/components/ui/Stack"; |
| 11 | +import { HStack, VStack } from "@/components/ui/Stack"; |
9 | 12 | import { Text } from "@/components/ui/Text"; |
10 | 13 | import { TextField } from "@/components/ui/TextField"; |
11 | 14 | import { semantic } from "@/styles"; |
12 | 15 |
|
| 16 | +import * as styles from "./StoreInfoStep.css"; |
| 17 | + |
13 | 18 | type StoreInfoStepProps = { |
14 | 19 | onNext: ({ |
15 | 20 | storeName, |
@@ -53,9 +58,25 @@ export const StoreInfoStep = ({ |
53 | 58 | 소개해주실 수 있나요? |
54 | 59 | </Text> |
55 | 60 |
|
56 | | - <Text as='p' typo='label1Md' color='text.alternative'> |
57 | | - *프렌차이즈의 경우, 반려될 수 있습니다. |
58 | | - </Text> |
| 61 | + <HStack gap={4} align='center'> |
| 62 | + <Text as='p' typo='label1Md' color='text.alternative'> |
| 63 | + 검수된 맛집만 제공하여 기준에 따라 반려될 수 있어요. |
| 64 | + </Text> |
| 65 | + <button |
| 66 | + type='button' |
| 67 | + aria-label='가게 등록 주의사항' |
| 68 | + onClick={() => { |
| 69 | + overlay.open(({ isOpen, close }) => ( |
| 70 | + <StoreRegistrationGuideBottomSheet |
| 71 | + open={isOpen} |
| 72 | + onOpenChange={close} |
| 73 | + /> |
| 74 | + )); |
| 75 | + }} |
| 76 | + > |
| 77 | + <InfoIcon width={16} height={16} color={semantic.icon.primary} /> |
| 78 | + </button> |
| 79 | + </HStack> |
59 | 80 | </VStack> |
60 | 81 | <Spacer size={44} /> |
61 | 82 |
|
@@ -95,3 +116,86 @@ export const StoreInfoStep = ({ |
95 | 116 | </VStack> |
96 | 117 | ); |
97 | 118 | }; |
| 119 | + |
| 120 | +type StoreRegistrationGuideBottomSheetProps = { |
| 121 | + open: boolean; |
| 122 | + onOpenChange: (open: boolean) => void; |
| 123 | +}; |
| 124 | + |
| 125 | +const GUIDE_INFO_LIST = [ |
| 126 | + { |
| 127 | + iconUrl: "/images/register/guide-1.png", |
| 128 | + title: ( |
| 129 | + <> |
| 130 | + <b>프랜차이즈 기준</b>은 어떻게 결정되나요? |
| 131 | + </> |
| 132 | + ), |
| 133 | + description: |
| 134 | + "맥도날드나 스타벅스와 같은 대형 프랜차이즈는 등록이 어려워요.", |
| 135 | + }, |
| 136 | + { |
| 137 | + iconUrl: "/images/register/guide-2.png", |
| 138 | + title: ( |
| 139 | + <> |
| 140 | + 응원은 <b>최대 3곳</b>까지 가능해요 |
| 141 | + </> |
| 142 | + ), |
| 143 | + description: |
| 144 | + "최대 3곳까지 가게를 응원할 수 있어요. 신중하게 가게를 응원해주세요.", |
| 145 | + }, |
| 146 | +]; |
| 147 | + |
| 148 | +const StoreRegistrationGuideBottomSheet = ({ |
| 149 | + open, |
| 150 | + onOpenChange, |
| 151 | +}: StoreRegistrationGuideBottomSheetProps) => { |
| 152 | + return ( |
| 153 | + <BottomSheet.Root open={open} onOpenChange={onOpenChange}> |
| 154 | + <BottomSheet.Content> |
| 155 | + <BottomSheet.Title className={styles.registrationGuideBottomSheetTitle}> |
| 156 | + <Text typo='title3Sb' color='neutral.10'> |
| 157 | + 가게를 등록할 때 주의할 사항이에요 |
| 158 | + </Text> |
| 159 | + </BottomSheet.Title> |
| 160 | + <BottomSheet.Body |
| 161 | + className={styles.registrationGuideBottomSheetContent} |
| 162 | + > |
| 163 | + {GUIDE_INFO_LIST.map(({ title, description, iconUrl }, index) => ( |
| 164 | + <VStack |
| 165 | + gap={10} |
| 166 | + className={styles.registrationGuideInfo} |
| 167 | + key={index} |
| 168 | + > |
| 169 | + <HStack align='center' gap={8}> |
| 170 | + <Image |
| 171 | + src={iconUrl} |
| 172 | + alt='가게 등록 주의사항' |
| 173 | + width={24} |
| 174 | + height={24} |
| 175 | + // TODO: 추후 제거 |
| 176 | + unoptimized |
| 177 | + /> |
| 178 | + <Text |
| 179 | + as='h4' |
| 180 | + typo='body1Sb' |
| 181 | + color='text.normal' |
| 182 | + className={styles.registrationGuideInfoTitle} |
| 183 | + > |
| 184 | + {title} |
| 185 | + </Text> |
| 186 | + </HStack> |
| 187 | + <Text as='p' typo='body1Md' color='text.alternative'> |
| 188 | + {description} |
| 189 | + </Text> |
| 190 | + </VStack> |
| 191 | + ))} |
| 192 | + </BottomSheet.Body> |
| 193 | + <BottomSheet.Footer> |
| 194 | + <Button size='fullWidth' onClick={() => onOpenChange(false)}> |
| 195 | + 확인 |
| 196 | + </Button> |
| 197 | + </BottomSheet.Footer> |
| 198 | + </BottomSheet.Content> |
| 199 | + </BottomSheet.Root> |
| 200 | + ); |
| 201 | +}; |
0 commit comments