-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 무한 캐러셀 컴포넌트에 이미지 슬라이드 기능 추가 및 스타일 개선
- Loading branch information
Showing
3 changed files
with
149 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 15 additions & 11 deletions
26
packages/design-system/src/components/infinite-carousel/infinite-carousel.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
import type { Meta } from '@storybook/react'; | ||
import { Meta } from '@storybook/react'; | ||
import InfiniteCarousel from './infinite-carousel'; | ||
import { BANNER_DATA } from './mocks/bottom-banner-data'; | ||
|
||
const meta: Meta<typeof InfiniteCarousel.Image> = { | ||
const meta: Meta<typeof InfiniteCarousel.Wrap> = { | ||
title: 'Common/InfiniteCarousel', | ||
component: InfiniteCarousel.Image, | ||
component: InfiniteCarousel.Wrap, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
args: {}, | ||
}; | ||
|
||
const bannerData = BANNER_DATA?.data?.performances || []; | ||
const TotalIndexData = BANNER_DATA?.data?.performanceCount; | ||
|
||
export default meta; | ||
|
||
export const Default = () => ( | ||
<InfiniteCarousel.Image> | ||
<InfiniteCarousel.Info> | ||
<InfiniteCarousel.Dday day="2024.01.14" /> | ||
<InfiniteCarousel.Artist artist="고고학" subtitle="공연 예매" /> | ||
</InfiniteCarousel.Info> | ||
</InfiniteCarousel.Image> | ||
); | ||
export const Default = () => { | ||
return ( | ||
<InfiniteCarousel.Wrap | ||
performances={bannerData} | ||
indexData={TotalIndexData} | ||
/> | ||
); | ||
}; |
122 changes: 103 additions & 19 deletions
122
packages/design-system/src/components/infinite-carousel/infinite-carousel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters