From 4981897cfa37beb7d113efe4af294d6144be8062 Mon Sep 17 00:00:00 2001 From: Leejin-Yang Date: Tue, 19 Mar 2024 23:42:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CategoryFoodList/categoryFoodList.css.ts | 1 + .../Common/CategoryItem/CategoryItem.tsx | 15 ++++++++++++--- .../Common/CategoryItem/categoryItem.css.ts | 6 +++++- .../CategoryStoreList/CategoryStoreList.tsx | 9 ++++++++- .../CategoryStoreList/categoryStoreList.css.ts | 5 +++-- src/pages/HomePage/homePage.css.ts | 1 + src/pages/ProductPage/ProductPage.tsx | 2 +- 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/Common/CategoryFoodList/categoryFoodList.css.ts b/src/components/Common/CategoryFoodList/categoryFoodList.css.ts index 6334456b..ae848bd2 100644 --- a/src/components/Common/CategoryFoodList/categoryFoodList.css.ts +++ b/src/components/Common/CategoryFoodList/categoryFoodList.css.ts @@ -3,5 +3,6 @@ import { style } from '@vanilla-extract/css'; export const categoryFoodListWrapper = style({ display: 'flex', gap: 10, + padding: '0 20px', overflowX: 'auto', }); diff --git a/src/components/Common/CategoryItem/CategoryItem.tsx b/src/components/Common/CategoryItem/CategoryItem.tsx index e91c6c74..41b99ff2 100644 --- a/src/components/Common/CategoryItem/CategoryItem.tsx +++ b/src/components/Common/CategoryItem/CategoryItem.tsx @@ -1,7 +1,7 @@ import cx from 'classnames'; import { useNavigate } from 'react-router-dom'; -import { imageWrapper, categoryImage, categoryName, circle } from './categoryItem.css'; +import { imageWrapper, categoryImage, categoryName, circle, bordered } from './categoryItem.css'; import { PATH } from '@/constants/path'; import { useGA } from '@/hooks/common'; @@ -14,10 +14,19 @@ interface CategoryItemProps { height?: number; isCircular?: boolean; hasName?: boolean; + isBordered?: boolean; categoryType: 'food' | 'store'; } -const CategoryItem = ({ category, width, height, categoryType, hasName, isCircular }: CategoryItemProps) => { +const CategoryItem = ({ + category, + width, + height, + categoryType, + hasName = false, + isCircular = false, + isBordered = false, +}: CategoryItemProps) => { const navigate = useNavigate(); const { selectCategory } = useCategoryActionContext(); const { id: categoryId, name, image } = category; @@ -37,7 +46,7 @@ const CategoryItem = ({ category, width, height, categoryType, hasName, isCircul return (