From a9c3713f69aba2740ed42b91848c6a48d0fd0909 Mon Sep 17 00:00:00 2001 From: Sudarshan Sreeram <sudarshan.sreeram19@imperial.ac.uk> Date: Thu, 13 Aug 2020 11:26:17 +0530 Subject: [PATCH] Add content to work due cards --- .../molecules/WorkDueGroup/index.tsx | 34 +++++++++++-------- .../organisms/LeftBar/style.module.scss | 9 +++++ 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/molecules/WorkDueGroup/index.tsx b/frontend/src/components/molecules/WorkDueGroup/index.tsx index 6651d08bf..30180b30d 100644 --- a/frontend/src/components/molecules/WorkDueGroup/index.tsx +++ b/frontend/src/components/molecules/WorkDueGroup/index.tsx @@ -7,14 +7,14 @@ export interface WorkDueGroupProps { } const WorkDueGroup: React.FC<WorkDueGroupProps> = ({ - filter, + filter }: WorkDueGroupProps) => { return ( <SideBarCardGroup title="Work Due" events={events .filter(({ subtitle }) => filter === undefined || subtitle === filter) - .map(({ type, title, subtitle }) => { + .map(({ type, title, subtitle, content }) => { let colorType: eventTypes; switch (type) { case "tutorial": @@ -26,9 +26,10 @@ const WorkDueGroup: React.FC<WorkDueGroupProps> = ({ } return { + type: colorType, title, subtitle: filter === undefined ? subtitle : undefined, - type: colorType, + content }; })} /> @@ -40,27 +41,32 @@ export default WorkDueGroup; let events = [ { type: "tutorial", - title: "Tutorial 1", - subtitle: "CO112", + title: "CO112", + subtitle: "Tutorial 1", + content: "Fri 14 Aug, 19:30" }, { type: "coursework", - title: "Coursework 1", - subtitle: "CO112", + title: "CO112", + subtitle: "Coursework 1", + content: "Mon 17 Aug, 17:00" }, { type: "coursework", - title: "Coursework 2", - subtitle: "CO140", + title: "CO140", + subtitle: "Coursework 2", + content: "Tue 18 Aug, 12:30" }, { type: "tutorial", - title: "PPT2", - subtitle: "CO142", + title: "CO142", + subtitle: "PPT2", + content: "Fri 21 Aug, 19:30" }, { type: "tutorial", - title: "PMT3", - subtitle: "CO120.2", - }, + title: "CO120.2", + subtitle: "PMT3", + content: "Mon 24 Aug, 12:30" + } ]; diff --git a/frontend/src/components/organisms/LeftBar/style.module.scss b/frontend/src/components/organisms/LeftBar/style.module.scss index 4b83558ac..d61ca7139 100644 --- a/frontend/src/components/organisms/LeftBar/style.module.scss +++ b/frontend/src/components/organisms/LeftBar/style.module.scss @@ -25,6 +25,15 @@ box-shadow: 0 0.125rem 0.625rem 0 rgba(0, 0, 0, 0.1); } +#leftbarWrapper::-webkit-scrollbar { + display: none; +} + +#leftbarWrapper { + -ms-overflow-style: none; + scrollbar-width: none; +} + :global(#wrapper.toggledLeft) #leftbarWrapper { visibility: visible; transform: translateX(0); -- GitLab