diff --git a/frontend/src/features/songs/components/CarouselItem.tsx b/frontend/src/features/songs/components/CarouselItem.tsx index be5f3f8bc..4221331c1 100644 --- a/frontend/src/features/songs/components/CarouselItem.tsx +++ b/frontend/src/features/songs/components/CarouselItem.tsx @@ -3,6 +3,7 @@ import { styled } from 'styled-components'; import emptyPlay from '@/assets/icon/empty-play.svg'; import { useAuthContext } from '@/features/auth/components/AuthProvider'; import LoginModal from '@/features/auth/components/LoginModal'; +import Thumbnail from '@/features/songs/components/Thumbnail'; import useModal from '@/shared/components/Modal/hooks/useModal'; import Spacing from '@/shared/components/Spacing'; import ROUTE_PATH from '@/shared/constants/path'; @@ -35,13 +36,13 @@ const CarouselItem = ({ votingSong }: CarouselItemProps) => { /> - + {title} {singer} - + {toMinSecText(videoLength)} @@ -63,12 +64,6 @@ const CollectingLink = styled.a` padding: 10px; `; -const Album = styled.img` - max-width: 120px; - background-color: white; - border-radius: 4px; -`; - const Contents = styled.div` display: flex; flex-direction: column; @@ -110,3 +105,9 @@ const PlayingTime = styled.div` const PlayingTimeText = styled.p` padding-top: 2px; `; + +const PlayIcon = styled.img` + width: 16px; + height: 16px; + margin: auto; +`; diff --git a/frontend/src/features/songs/components/CollectionCarousel.tsx b/frontend/src/features/songs/components/CollectionCarousel.tsx index 1a85b149d..81c214f25 100644 --- a/frontend/src/features/songs/components/CollectionCarousel.tsx +++ b/frontend/src/features/songs/components/CollectionCarousel.tsx @@ -38,7 +38,7 @@ const CollectionCarousel = ({ children }: CarouselProps) => { {Array.from({ length: numberOfItems }, (_, idx) => ( - + ))} @@ -91,10 +91,10 @@ const IndicatorWrapper = styled.div` background-color: transparent; `; -const Dot = styled.div<{ isActive: boolean }>` +const Dot = styled.div<{ $isActive: boolean }>` width: 8px; height: 8px; - background-color: ${({ isActive, theme: { color } }) => - isActive ? color.primary : color.secondary}; + background-color: ${({ $isActive, theme: { color } }) => + $isActive ? color.primary : color.secondary}; border-radius: 50%; `; diff --git a/frontend/src/features/songs/components/Thumbnail.tsx b/frontend/src/features/songs/components/Thumbnail.tsx index 5c487cfa3..9a90e106a 100644 --- a/frontend/src/features/songs/components/Thumbnail.tsx +++ b/frontend/src/features/songs/components/Thumbnail.tsx @@ -4,15 +4,16 @@ import type { ImgHTMLAttributes, SyntheticEvent } from 'react'; interface ThumbnailProps extends ImgHTMLAttributes { size?: Size; + borderRadius?: number; } -const Thumbnail = ({ size = 'lg', ...props }: ThumbnailProps) => { +const Thumbnail = ({ size = 'lg', borderRadius = 4, ...props }: ThumbnailProps) => { const insertDefaultJacket = ({ currentTarget }: SyntheticEvent) => { currentTarget.src = defaultAlbumJacket; }; return ( - + 노래 앨범 ); @@ -20,10 +21,10 @@ const Thumbnail = ({ size = 'lg', ...props }: ThumbnailProps) => { export default Thumbnail; -const Wrapper = styled.div<{ $size: Size }>` +const Wrapper = styled.div<{ $size: Size; $borderRadius: number }>` overflow: hidden; ${({ $size }) => SIZE_VARIANTS[$size]}; - border-radius: 4px; + border-radius: ${({ $borderRadius }) => $borderRadius}px; `; const SIZE_VARIANTS = {