fix: divider usage in HeaderAndActions (#113)
* fix: use StatusType * fix: use AutoLoadStatus * fix: use typof SiteSupport.* * fix: one more of Status to StatusType * fix: use import type * fix: use path alias imports * fix: use Extract * fix: remove unnecessary import * fix: **revert this later** - comment out build errs * fix: add schedule to story * feat: add props for dividers * revert: un-comment build errors This reverts commit082e9e0269. * Revert "fix: remove unnecessary import" This reverts commit9230346d26. * Revert "fix: use Extract" This reverts commitf6aa80d411. * Revert "fix: use path alias imports" This reverts commitea9bf3c635. * Revert "fix: use import type" This reverts commit27fee47778. * Revert "Merge branch 'fix/Status-to-StatusType' into fix/divider-usage" This reverts commitb1715ea360, reversing changes made to9ccc43ca27. * fix: dont use magic number * fix: lint errs * fix: reorder imports
This commit is contained in:
@@ -2,6 +2,7 @@ import { Course, Status } from '@shared/types/Course';
|
|||||||
import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting';
|
import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting';
|
||||||
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
||||||
import Instructor from '@shared/types/Instructor';
|
import Instructor from '@shared/types/Instructor';
|
||||||
|
import { UserSchedule } from '@shared/types/UserSchedule';
|
||||||
import type { Meta, StoryObj } from '@storybook/react';
|
import type { Meta, StoryObj } from '@storybook/react';
|
||||||
import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup';
|
import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup';
|
||||||
|
|
||||||
@@ -50,6 +51,12 @@ const exampleCourse: Course = new Course({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const exampleSchedule: UserSchedule = new UserSchedule({
|
||||||
|
courses: [exampleCourse],
|
||||||
|
name: 'Example Schedule',
|
||||||
|
hours: 0,
|
||||||
|
});
|
||||||
|
|
||||||
const meta: Meta<typeof CourseCatalogInjectedPopup> = {
|
const meta: Meta<typeof CourseCatalogInjectedPopup> = {
|
||||||
title: 'Components/Injected/CourseCatalogInjectedPopup',
|
title: 'Components/Injected/CourseCatalogInjectedPopup',
|
||||||
component: CourseCatalogInjectedPopup,
|
component: CourseCatalogInjectedPopup,
|
||||||
@@ -64,5 +71,6 @@ type Story = StoryObj<typeof CourseCatalogInjectedPopup>;
|
|||||||
export const Default: Story = {
|
export const Default: Story = {
|
||||||
args: {
|
args: {
|
||||||
course: exampleCourse,
|
course: exampleCourse,
|
||||||
|
activeSchedule: exampleSchedule,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { Course, ScrapedRow } from '@shared/types/Course';
|
import type { Course, ScrapedRow } from '@shared/types/Course';
|
||||||
import React, { useEffect, useState } from 'react';
|
import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot';
|
||||||
|
|
||||||
import AutoLoad from '@views/components/injected/AutoLoad/AutoLoad';
|
import AutoLoad from '@views/components/injected/AutoLoad/AutoLoad';
|
||||||
import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup';
|
import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup';
|
||||||
import RecruitmentBanner from '@views/components/injected/RecruitmentBanner/RecruitmentBanner';
|
import RecruitmentBanner from '@views/components/injected/RecruitmentBanner/RecruitmentBanner';
|
||||||
@@ -13,7 +12,7 @@ import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper';
|
|||||||
import getCourseTableRows from '@views/lib/getCourseTableRows';
|
import getCourseTableRows from '@views/lib/getCourseTableRows';
|
||||||
import type { SiteSupportType } from '@views/lib/getSiteSupport';
|
import type { SiteSupportType } from '@views/lib/getSiteSupport';
|
||||||
import { populateSearchInputs } from '@views/lib/populateSearchInputs';
|
import { populateSearchInputs } from '@views/lib/populateSearchInputs';
|
||||||
import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
support: Extract<SiteSupportType, 'COURSE_CATALOG_DETAILS' | 'COURSE_CATALOG_LIST'>;
|
support: Extract<SiteSupportType, 'COURSE_CATALOG_DETAILS' | 'COURSE_CATALOG_LIST'>;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Status, StatusType } from '@shared/types/Course';
|
import type { StatusType } from '@shared/types/Course';
|
||||||
|
import { Status } from '@shared/types/Course';
|
||||||
import Text from '@views/components/common/Text/Text';
|
import Text from '@views/components/common/Text/Text';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ const HeadingAndActions: React.FC<HeadingAndActionProps> = ({ course, onClose, a
|
|||||||
</div>
|
</div>
|
||||||
<div className='my-3 flex flex-wrap items-center gap-[15px]'>
|
<div className='my-3 flex flex-wrap items-center gap-[15px]'>
|
||||||
<Button variant='filled' color='ut-burntorange' icon={CalendarMonth} onClick={handleOpenCalendar} />
|
<Button variant='filled' color='ut-burntorange' icon={CalendarMonth} onClick={handleOpenCalendar} />
|
||||||
<Divider type='solid' color='ut-offwhite' className='h-7' />
|
<Divider orientation='vertical' size='28px' />
|
||||||
<Button variant='outline' color='ut-blue' icon={Reviews} onClick={handleOpenRateMyProf}>
|
<Button variant='outline' color='ut-blue' icon={Reviews} onClick={handleOpenRateMyProf}>
|
||||||
RateMyProf
|
RateMyProf
|
||||||
</Button>
|
</Button>
|
||||||
@@ -150,7 +150,7 @@ const HeadingAndActions: React.FC<HeadingAndActionProps> = ({ course, onClose, a
|
|||||||
{!courseAdded ? 'Add Course' : 'Remove Course'}
|
{!courseAdded ? 'Add Course' : 'Remove Course'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
<Divider orientation='horizontal' size='100%' />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user