basic component laid out - missing Text and Right Icon, can add more stories

This commit is contained in:
abhinavchadaga
2024-01-31 03:27:37 -06:00
parent 9cc299ced6
commit cbbea7f810
3 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
import { Meta, StoryObj } from '@storybook/react';
import { Course, Status } from 'src/shared/types/Course';
import { CourseMeeting, DAY_MAP } from 'src/shared/types/CourseMeeting';
import { CourseSchedule } from 'src/shared/types/CourseSchedule';
import Instructor from 'src/shared/types/Instructor';
import CalendarCourse from 'src/views/components/common/CalendarCourseMeeting/CalendarCourseMeeting';
const meta = {
title: 'Components/Common/CalendarCourseMeeting',
component: CalendarCourse,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {
course: { control: 'object' },
meetingIdx: { control: 'number' },
color: { control: 'color' },
rightIcon: { control: 'object' },
},
} satisfies Meta<typeof CalendarCourse>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
course: new Course({
uniqueId: 123,
number: '101',
fullName: 'Course 101',
courseName: 'Course',
department: 'BVO',
creditHours: 3,
status: Status.OPEN,
instructors: [new Instructor({ firstName: '', lastName: 'Bevo', fullName: 'Bevo' })],
isReserved: false,
url: '',
flags: [],
schedule: new CourseSchedule({
meetings: [
new CourseMeeting({
days: [DAY_MAP.M, DAY_MAP.W, DAY_MAP.F],
startTime: 480,
endTime: 570,
location: {
building: 'UTC',
room: '123',
},
}),
],
}),
instructionMode: 'In Person',
semester: {
year: 2024,
season: 'Spring',
},
}),
meetingIdx: 0,
color: 'red',
},
};