Skip to content

Commit

Permalink
fix : build 에러 해결
Browse files Browse the repository at this point in the history
변경된 타입에 맞춰 스토리 수정
  • Loading branch information
HelloWook committed Dec 29, 2024
1 parent 449ff05 commit 47e27d4
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions src/components/Common/ItemSlider/ItemSlider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { Meta, StoryObj } from '@storybook/react';

import { ItemSlider } from './ItemSlider';
import { useMemo } from 'react';
import SkyTheme from '@/asset/letter1/letter1.svg?react';
import HaertTheme from '@/asset/letter2/letter2.svg?react';
import FlowerTheme from '@/asset/letter3/letter3.svg?react';

const meta: Meta<typeof ItemSlider> = {
component: ItemSlider,
Expand All @@ -12,31 +15,26 @@ export default meta;

type Story = StoryObj<typeof ItemSlider>;

const textItems = [
{ name: '테스트 글꼴', id: '1' },
{ name: '테스트 글꼴', id: '2' },
{ name: '테스트 글꼴', id: '3' },
{ name: '테스트 글꼴', id: '4' },
{ name: '테스트 글꼴', id: '5' },
{ name: '테스트 글꼴', id: '6' },
{ name: '테스트 글꼴', id: '7' },
{ name: '테스트 글꼴', id: '9' },
{ name: '테스트 글꼴', id: '10' },
{ name: '테스트 글꼴', id: '11' },
{ name: '테스트 글꼴', id: '12' },
{ name: '테스트 글꼴', id: '13' },
{ name: '테스트 글꼴', id: '14' },
{ name: '테스트 글꼴', id: '15' }
];

const imageItems = [
{ id: '편지지_샘플_1', name: '이미지' },
{ id: '편지지_샘플_2', name: '이미지' },
{ id: '편지지_샘플_3', name: '이미지' },
{ id: '편지지_샘플_4', name: '이미지' },
{ id: '편지지_샘플_5', name: '이미지' }
];

const textItems = useMemo(
() => [
{ name: 'font-sans', id: '1', fontName: '기본 폰트' },
{ name: 'font-bagelfatone', id: '2', fontName: '베이글 폰트' },
{ name: 'font-cookierun', id: '3', fontName: '쿠키런 폰트' },
{ name: 'font-pyeongchangpeace', id: '4', fontName: '평창 폰트' },
{ name: 'font-sagak', id: '5', fontName: '필기체 폰트' },
{ name: 'font-serif', id: '6', fontName: '세리프 폰트' }
],
[]
);

const imageItems = useMemo(
() => [
{ id: '1', src: SkyTheme, name: '이미지' },
{ id: '2', src: HaertTheme, name: '이미지' },
{ id: '3', src: FlowerTheme, name: '이미지' }
],
[]
);
export const TextSlider: Story = {
args: {
itemType: 'text',
Expand All @@ -49,7 +47,6 @@ export const ImageSlider: Story = {
args: {
itemType: 'image',
itemIDList: imageItems,

spaceBetween: 20
}
};

0 comments on commit 47e27d4

Please sign in to comment.