diff --git a/src/shared/util/storybook.ts b/src/shared/util/storybook.ts
new file mode 100644
index 00000000..8bea28a9
--- /dev/null
+++ b/src/shared/util/storybook.ts
@@ -0,0 +1,9 @@
+import { theme } from 'unocss/preset-mini';
+
+import { getCourseColors } from './colors';
+
+export const tailwindColorways = Object.keys(theme.colors)
+ // check that the color is a colorway (is an object)
+ .filter(color => typeof theme.colors[color] === 'object')
+ .slice(0, 17)
+ .map(color => getCourseColors(color as keyof typeof theme.colors));
diff --git a/src/stories/components/List.stories.tsx b/src/stories/components/List.stories.tsx
index acccb87d..3714667e 100644
--- a/src/stories/components/List.stories.tsx
+++ b/src/stories/components/List.stories.tsx
@@ -5,8 +5,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import List from '@views/components/common/List/List';
import PopupCourseBlock from '@views/components/common/PopupCourseBlock/PopupCourseBlock';
import React from 'react';
-
-import { TestColors } from './PopupCourseBlock.stories';
+import { tailwindColorways } from 'src/shared/util/storybook';
const numberOfCourses = 5;
@@ -71,7 +70,7 @@ export const GenerateCourses = count => {
const exampleCourses = GenerateCourses(numberOfCourses);
const generateCourseBlocks = (exampleCourses, colors) =>
exampleCourses.map((course, i) => );
-export const ExampleCourseBlocks = generateCourseBlocks(exampleCourses, TestColors);
+export const ExampleCourseBlocks = generateCourseBlocks(exampleCourses, tailwindColorways);
const meta = {
title: 'Components/Common/List',
diff --git a/src/stories/components/PopupCourseBlock.stories.tsx b/src/stories/components/PopupCourseBlock.stories.tsx
index fa43f65d..be5b8e69 100644
--- a/src/stories/components/PopupCourseBlock.stories.tsx
+++ b/src/stories/components/PopupCourseBlock.stories.tsx
@@ -5,7 +5,7 @@ import { getCourseColors } from '@shared/util/colors';
import type { Meta, StoryObj } from '@storybook/react';
import PopupCourseBlock from '@views/components/common/PopupCourseBlock/PopupCourseBlock';
import React from 'react';
-import { theme } from 'unocss/preset-mini';
+import { tailwindColorways } from 'src/shared/util/storybook';
/**
* Represents an example course.
@@ -101,16 +101,10 @@ export const Variants: Story = {
),
};
-export const TestColors = Object.keys(theme.colors)
- // check that the color is a colorway (is an object)
- .filter(color => typeof theme.colors[color] === 'object')
- .slice(0, 17)
- .map(color => getCourseColors(color as keyof typeof theme.colors));
-
export const AllColors: Story = {
render: props => (
- {TestColors.map((color, i) => (
+ {tailwindColorways.map((color, i) => (
))}
diff --git a/src/views/components/PopupMain.tsx b/src/views/components/PopupMain.tsx
index 808aa0f7..4d5ca71e 100644
--- a/src/views/components/PopupMain.tsx
+++ b/src/views/components/PopupMain.tsx
@@ -10,8 +10,11 @@ import { handleOpenCalendar } from '@views/components/injected/CourseCatalogInje
import useSchedules from '@views/hooks/useSchedules';
import { openTabFromContentScript } from '@views/lib/openNewTabFromContentScript';
import React from 'react';
-import { FaCalendarAlt, FaCog, FaRedo } from 'react-icons/fa'; // Added FaRedo for the refresh icon
-import { TestColors } from 'src/stories/components/PopupCourseBlock.stories';
+import { tailwindColorways } from 'src/shared/util/storybook';
+
+import CalendarIcon from '~icons/material-symbols/calendar-month';
+import RefreshIcon from '~icons/material-symbols/refresh';
+import SettingsIcon from '~icons/material-symbols/settings';
/**
* Renders the main popup component.
@@ -21,7 +24,7 @@ export default function PopupMain() {
const [activeSchedule] = useSchedules();
const draggableElements = activeSchedule?.courses.map((course, i) => (
-
+
));
const handleOpenOptions = async () => {
@@ -32,59 +35,36 @@ export default function PopupMain() {
return (
-
+
-

+
-
+
UT Registration
-
+
Plus
-
-
-
-
+
+
+
MAIN SCHEDULE:
-
-
- 22 HOURS
-
-
- 8 Courses
-
+
+ 22 HOURS
+ 8 Courses
{/* Integrate the List component here */}
@@ -97,49 +77,25 @@ export default function PopupMain() {
gap={12} // Spacing between items
/>
) : null}
-
-
-
+
+
-
-
+
-
-
+
+
@@ -148,11 +104,9 @@ export default function PopupMain() {
-
-
- DATA UPDATED ON: 12:00 AM 02/01/2024
-
-
+
+ DATA UPDATED ON: 12:00 AM 02/01/2024
+