fix(storybook): fix typecheck errors in SortableList.stories.tsx
Co-authored-by: Razboy20 <29903962+Razboy20@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import Instructor from '@shared/types/Instructor';
|
|||||||
import { tailwindColorways } from '@shared/util/storybook';
|
import { tailwindColorways } from '@shared/util/storybook';
|
||||||
import type { Meta, StoryObj } from '@storybook/react';
|
import type { Meta, StoryObj } from '@storybook/react';
|
||||||
import PopupCourseBlock from '@views/components/common/PopupCourseBlock';
|
import PopupCourseBlock from '@views/components/common/PopupCourseBlock';
|
||||||
import type { BaseItem } from '@views/components/common/SortableList';
|
import type { BaseItem, SortableListProps } from '@views/components/common/SortableList';
|
||||||
import { SortableList } from '@views/components/common/SortableList';
|
import { SortableList } from '@views/components/common/SortableList';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
@@ -94,11 +94,13 @@ export const Default: Story = {
|
|||||||
course,
|
course,
|
||||||
})),
|
})),
|
||||||
onChange: () => {},
|
onChange: () => {},
|
||||||
renderItem: ({ id, course }) => <PopupCourseBlock key={id} course={course} colors={course.colors} />,
|
renderItem: (item: CourseWithId) => (
|
||||||
|
<PopupCourseBlock key={item.id} course={item.course} colors={item.course.colors} />
|
||||||
|
),
|
||||||
},
|
},
|
||||||
render: args => (
|
render: args => (
|
||||||
<div className='h-3xl w-3xl transform-none'>
|
<div className='h-3xl w-3xl transform-none'>
|
||||||
<SortableList {...args} />
|
<SortableList {...(args as SortableListProps<CourseWithId>)} />
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user