fix: chromatic storybook - CourseCatalogInjectedPopup (#106)
* chore: add pnpm peer deps * fix: merge conflict and rebase * chore: remove deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { Course } from '@shared/types/Course';
|
||||
import type { UserSchedule } from '@shared/types/UserSchedule';
|
||||
import Popup from '@views/components/common/Popup/Popup';
|
||||
import React from 'react';
|
||||
import type { Course } from 'src/shared/types/Course';
|
||||
import type { UserSchedule } from 'src/shared/types/UserSchedule';
|
||||
|
||||
import Description from './Description';
|
||||
import GradeDistribution from './GradeDistribution';
|
||||
@@ -23,13 +23,18 @@ interface CourseCatalogInjectedPopupProps {
|
||||
* @param {Function} props.onClose - The function to close the popup.
|
||||
* @returns {JSX.Element} The CourseCatalogInjectedPopup component.
|
||||
*/
|
||||
const CourseCatalogInjectedPopup: React.FC<CourseCatalogInjectedPopupProps> = ({ course, activeSchedule, onClose }) => (
|
||||
<Popup overlay className='max-w-[780px] px-6' onClose={onClose}>
|
||||
<div className='flex flex-col'>
|
||||
<HeadingAndActions course={course} onClose={onClose} activeSchedule={activeSchedule} />
|
||||
<Description lines={course.description} />
|
||||
<GradeDistribution course={course} />
|
||||
</div>
|
||||
</Popup>
|
||||
);
|
||||
export default CourseCatalogInjectedPopup;
|
||||
export default function CourseCatalogInjectedPopup({
|
||||
course,
|
||||
activeSchedule,
|
||||
onClose,
|
||||
}: CourseCatalogInjectedPopupProps) {
|
||||
return (
|
||||
<Popup overlay className='max-w-[780px] px-6' onClose={onClose}>
|
||||
<div className='flex flex-col'>
|
||||
<HeadingAndActions course={course} onClose={onClose} activeSchedule={activeSchedule} />
|
||||
<Description lines={course.description} />
|
||||
<GradeDistribution course={course} />
|
||||
</div>
|
||||
</Popup>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user