import { Course, Status } from '@shared/types/Course'; import { getCourseColors } from '@shared/util/colors'; import { Meta, StoryObj } from '@storybook/react'; import CalendarCourseCell from '@views/components/common/CalendarCourseCell/CalendarCourseCell'; import React from 'react'; import { exampleCourse } from './PopupCourseBlock.stories'; const meta = { title: 'Components/Common/CalendarCourseCell', component: CalendarCourseCell, parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { department: { control: { type: 'text' } }, courseNumber: { control: { type: 'text' } }, instructorLastName: { control: { type: 'text' } }, status: { control: { type: 'select', options: Object.values(Status) } }, meetingTime: { control: { type: 'text' } }, colors: { control: { type: 'object' } }, }, render: (args: any) => (
), args: { department: exampleCourse.department, courseNumber: exampleCourse.number, instructorLastName: exampleCourse.instructors[0].lastName, status: exampleCourse.status, meetingTime: exampleCourse.schedule.meetings[0].getTimeString({ separator: '-' }), colors: getCourseColors('emerald', 500), }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Variants: Story = { render: props => (
), };