diff --git a/src/components/Product/ProductItem/ProductItem.tsx b/src/components/Product/ProductItem/ProductItem.tsx index 69923ba0..25baea67 100644 --- a/src/components/Product/ProductItem/ProductItem.tsx +++ b/src/components/Product/ProductItem/ProductItem.tsx @@ -1,7 +1,7 @@ import { Skeleton } from '@fun-eat/design-system'; import { memo, useState } from 'react'; -import { container, previewWrapper, productImage, summaryWrapper } from './productItem.css'; +import { container, imageWrapper, previewWrapper, productImage, summaryWrapper } from './productItem.css'; import { SvgIcon, Text } from '@/components/Common'; import { ellipsis } from '@/styles/common.css'; @@ -18,19 +18,21 @@ const ProductItem = ({ product }: ProductItemProps) => { return (
- {`${name}사진`} setIsImageLoading(false)} - /> - {/*스켈레톤 디자인시스템에서 수정*/} - {isImageLoading && ( -
- -
- )} +
+ {`${name}사진`} setIsImageLoading(false)} + /> + {/*스켈레톤 디자인시스템에서 수정*/} + {isImageLoading && ( +
+ +
+ )} +
{name} diff --git a/src/components/Product/ProductItem/productItem.css.ts b/src/components/Product/ProductItem/productItem.css.ts index 949d5ff3..17701c41 100644 --- a/src/components/Product/ProductItem/productItem.css.ts +++ b/src/components/Product/ProductItem/productItem.css.ts @@ -4,6 +4,11 @@ export const container = style({ position: 'relative', }); +export const imageWrapper = style({ + position: 'relative', + width: '100%', +}); + export const productImage = style({ width: '100%', height: 'auto', diff --git a/src/components/Recipe/RecipeItem/RecipeItem.tsx b/src/components/Recipe/RecipeItem/RecipeItem.tsx index 5c7f2998..53965106 100644 --- a/src/components/Recipe/RecipeItem/RecipeItem.tsx +++ b/src/components/Recipe/RecipeItem/RecipeItem.tsx @@ -74,7 +74,11 @@ const ImageAndFavoriteButton = ({ children }: PropsWithChildren) => { loading="lazy" onLoad={() => image && setIsImageLoading(false)} /> - {isImageLoading && image && } + {isImageLoading && image && ( +
+ +
+ )}
e.preventDefault()}>
diff --git a/src/components/Recipe/RecipeItem/recipeItem.css.ts b/src/components/Recipe/RecipeItem/recipeItem.css.ts index 4c217045..c4147208 100644 --- a/src/components/Recipe/RecipeItem/recipeItem.css.ts +++ b/src/components/Recipe/RecipeItem/recipeItem.css.ts @@ -3,6 +3,7 @@ import { style } from '@vanilla-extract/css'; export const imageWrapper = style({ position: 'relative', + width: '100%', lineHeight: 0, });