diff --git a/src/views/components/CourseCatalogMain.tsx b/src/views/components/CourseCatalogMain.tsx index 494ef1bb..0db7d739 100644 --- a/src/views/components/CourseCatalogMain.tsx +++ b/src/views/components/CourseCatalogMain.tsx @@ -9,7 +9,7 @@ import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot'; import Icon from './common/Icon/Icon'; import Text from './common/Text/Text'; import AutoLoad from './injected/AutoLoad/AutoLoad'; -import CoursePanel from './injected/CoursePanel/CoursePanel'; +import CoursePopup from './injected/CoursePopup/CoursePopup'; import TableHead from './injected/TableHead'; import TableRow from './injected/TableRow/TableRow'; @@ -65,6 +65,7 @@ export default function CourseCatalogMain({ support }: Props) { } return ( ); })} - {selectedCourse && } + {selectedCourse && } ); diff --git a/src/views/components/common/Panel/Panel.module.scss b/src/views/components/common/Popup/Popup.module.scss similarity index 91% rename from src/views/components/common/Panel/Panel.module.scss rename to src/views/components/common/Popup/Popup.module.scss index 2b481499..3b14a9eb 100644 --- a/src/views/components/common/Panel/Panel.module.scss +++ b/src/views/components/common/Popup/Popup.module.scss @@ -18,7 +18,7 @@ .body { overflow-y: auto; z-index: 2147483647; - background-color: rgb(52, 53, 65); + background-color: $white; box-shadow: 0px 12px 30px 0px #323e5f29; transition: box-shadow 0.15s; } diff --git a/src/views/components/common/Panel/Panel.tsx b/src/views/components/common/Popup/Popup.tsx similarity index 77% rename from src/views/components/common/Panel/Panel.tsx rename to src/views/components/common/Popup/Popup.tsx index 819743c4..745b6cb5 100644 --- a/src/views/components/common/Panel/Panel.tsx +++ b/src/views/components/common/Popup/Popup.tsx @@ -1,18 +1,19 @@ import classNames from 'classnames'; import React, { PropsWithChildren } from 'react'; -import styles from './Panel.module.scss'; +import styles from './Popup.module.scss'; interface Props { testId?: string; style?: React.CSSProperties; className?: string; + /** Should it display a subtle dark overlay over the rest of the screen */ overlay?: boolean; } /** * */ -export default function Panel(props: PropsWithChildren) { +export default function Popup(props: PropsWithChildren) { return (
void; -} - -export default function CoursePanel({ course, onClose }: Props) { - return ( - -
-
- ✕ -
-
- -
-
{course.courseName}
-
{course.uniqueId}
-
-
- ); -} diff --git a/src/views/components/injected/CoursePanel/CoursePanel.module.scss b/src/views/components/injected/CoursePopup/CoursePopup.module.scss similarity index 87% rename from src/views/components/injected/CoursePanel/CoursePanel.module.scss rename to src/views/components/injected/CoursePopup/CoursePopup.module.scss index 3aeca90a..8644dc21 100644 --- a/src/views/components/injected/CoursePanel/CoursePanel.module.scss +++ b/src/views/components/injected/CoursePopup/CoursePopup.module.scss @@ -1,4 +1,4 @@ -.panelBody { +.popupBody { height: auto; color: white; padding: 10px; @@ -7,7 +7,7 @@ justify-content: center; } -.coursePanelBase { +.coursePopupBase { position: fixed; transform: translateY(-50%); top: 15px; @@ -15,13 +15,13 @@ z-index: 2147483647; } -.coursePanelHeader { +.coursePopupHeader { display: flex; height: 50; background-color: #29465b; width: 100%; - .closePanelButton { + .closePopupButton { display: flex; align-items: center; justify-content: center; diff --git a/src/views/components/injected/CoursePopup/CoursePopup.tsx b/src/views/components/injected/CoursePopup/CoursePopup.tsx new file mode 100644 index 00000000..5bc62ffa --- /dev/null +++ b/src/views/components/injected/CoursePopup/CoursePopup.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { Course } from 'src/shared/types/Course'; +import Icon from '../../common/Icon/Icon'; +import Popup from '../../common/Popup/Popup'; +import styles from './CoursePopup.module.scss'; + +interface Props { + course: Course; + onClose: () => void; +} + +/** + * The popup that appears when the user clicks on a course for more details. + */ +export default function CoursePopup({ course, onClose }: Props) { + return ( + +
+
{course.courseName}
+
{course.uniqueId}
+
+
+ ); +}