feat: experimental toggle for icons, left off for now (#237)
* feat: temporary removal of waitlist etc * feat: experimental toggle for icons for now * feat: popupmain toggle * feat: cal header toggle * feat: adjusted course cell for toggle * feat: fine it'll be a constant * chore: lint * feat: other experimental options
This commit is contained in:
@@ -2,6 +2,7 @@ import type { StatusType } from '@shared/types/Course';
|
||||
import { Status } from '@shared/types/Course';
|
||||
import type { CourseColors } from '@shared/types/ThemeColors';
|
||||
import { pickFontColor } from '@shared/util/colors';
|
||||
import { enableCourseStatusChips } from '@shared/util/experimental';
|
||||
import Text from '@views/components/common/Text/Text';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
@@ -43,13 +44,15 @@ export default function CalendarCourseCell({
|
||||
onClick,
|
||||
}: CalendarCourseCellProps): JSX.Element {
|
||||
let rightIcon: React.ReactNode | null = null;
|
||||
// if (status === Status.WAITLISTED) {
|
||||
// rightIcon = <WaitlistIcon className='h-5 w-5' />;
|
||||
// } else if (status === Status.CLOSED) {
|
||||
// rightIcon = <ClosedIcon className='h-5 w-5' />;
|
||||
// } else if (status === Status.CANCELLED) {
|
||||
// rightIcon = <CancelledIcon className='h-5 w-5' />;
|
||||
// }
|
||||
if (enableCourseStatusChips) {
|
||||
if (status === Status.WAITLISTED) {
|
||||
rightIcon = <WaitlistIcon className='h-5 w-5' />;
|
||||
} else if (status === Status.CLOSED) {
|
||||
rightIcon = <ClosedIcon className='h-5 w-5' />;
|
||||
} else if (status === Status.CANCELLED) {
|
||||
rightIcon = <CancelledIcon className='h-5 w-5' />;
|
||||
}
|
||||
}
|
||||
|
||||
// text-white or text-black based on secondaryColor
|
||||
const fontColor = pickFontColor(colors.primaryColor);
|
||||
|
||||
Reference in New Issue
Block a user