some work
This commit is contained in:
16
src/stories/injected/CoursePopup2.stories.ts
Normal file
16
src/stories/injected/CoursePopup2.stories.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { Meta } from '@storybook/react';
|
||||||
|
import { Course } from 'src/shared/types/Course';
|
||||||
|
|
||||||
|
const testCourse: Course = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const meta: Meta<typeof CoursePopup2> = {
|
||||||
|
component: CoursePopup2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default meta;
|
||||||
|
type Story = StoryObj<typeof meta>;
|
||||||
|
export const Open: Story = {
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Course } from 'src/shared/types/Course';
|
||||||
|
import Text from '../../common/Text/Text';
|
||||||
|
import { Button } from '../../common/Button/Button';
|
||||||
|
|
||||||
|
interface CourseHeadingAndActionsProps {
|
||||||
|
course: Course;
|
||||||
|
}
|
||||||
|
|
||||||
|
const CourseHeadingAndActions = ({ course }: CourseHeadingAndActionsProps) => {
|
||||||
|
const { courseName, department, number, uniqueId } = course;
|
||||||
|
return (
|
||||||
|
<div className='w-full pb-3 pt-6'>
|
||||||
|
<div className='flex gap-1'>
|
||||||
|
<Text variant='h1'>
|
||||||
|
{courseName} ({department} {number})
|
||||||
|
</Text>
|
||||||
|
<Button>{uniqueId}</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CourseHeadingAndActions;
|
||||||
20
src/views/components/injected/CoursePopup2/CoursePopup2.tsx
Normal file
20
src/views/components/injected/CoursePopup2/CoursePopup2.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Course } from 'src/shared/types/Course';
|
||||||
|
import { UserSchedule } from 'src/shared/types/UserSchedule';
|
||||||
|
import Popup from '../../common/Popup/Popup';
|
||||||
|
import CourseHeadingAndActions from './CourseHeadingAndActions';
|
||||||
|
|
||||||
|
interface CoursePopup2Props {
|
||||||
|
course: Course;
|
||||||
|
activeSchedule?: UserSchedule;
|
||||||
|
}
|
||||||
|
|
||||||
|
const CoursePopup2 = ({ course, activeSchedule }: CoursePopup2Props) => (
|
||||||
|
<Popup className='px-6'>
|
||||||
|
<div className='flex flex-col'>
|
||||||
|
<CourseHeadingAndActions course={course} />
|
||||||
|
</div>
|
||||||
|
</Popup>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default CoursePopup2;
|
||||||
Reference in New Issue
Block a user