From 51b6799d73bd08b85d16ba667188abb7c71874de Mon Sep 17 00:00:00 2001 From: Casey Charleston Date: Sat, 17 Feb 2024 18:35:17 -0600 Subject: [PATCH] dropdown and calendar schedules storybook --- pnpm-lock.yaml | 14 ++++++++++++ src/stories/components/Dropdown.stories.tsx | 12 +++++----- .../CalendarSchedules/CalendarSchedules.tsx | 2 -- .../ScheduleListItem/ScheduleListItem.tsx | 22 ++++++++++--------- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d24b53a2..9d4c5682 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12337,6 +12337,20 @@ packages: resolution: {integrity: sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==} dev: false + /sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: false + /sumchecker@3.0.1: resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} engines: {node: '>= 8.0'} diff --git a/src/stories/components/Dropdown.stories.tsx b/src/stories/components/Dropdown.stories.tsx index 542ff772..ba9704a4 100644 --- a/src/stories/components/Dropdown.stories.tsx +++ b/src/stories/components/Dropdown.stories.tsx @@ -62,7 +62,7 @@ const schedules = [ instructionMode: 'In Person', semester: { year: 2024, - season: 'Fall' + season: 'Fall', }, }), ], @@ -99,7 +99,7 @@ const schedules = [ instructionMode: 'In Person', semester: { year: 2024, - season: 'Fall' + season: 'Fall', }, }), new Course({ @@ -130,7 +130,7 @@ const schedules = [ instructionMode: 'In Person', semester: { year: 2024, - season: 'Fall' + season: 'Fall', }, }), ], @@ -151,9 +151,7 @@ export const Hidden: Story = { dummySchedules: schedules, dummyActiveIndex: 0, scheduleComponents: schedules.map((schedule, index) => ( -
{}} className='p-l-3'> - -
+ )), }, -}; \ No newline at end of file +}; diff --git a/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx b/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx index a89de83f..f9a84e95 100644 --- a/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx +++ b/src/views/components/common/CalendarSchedules/CalendarSchedules.tsx @@ -16,9 +16,7 @@ export function CalendarSchedules(props: Props) { const [schedules, setSchedules] = useState(props.dummySchedules || []); const scheduleComponents = schedules.map((schedule, index) => ( -
setActiveScheduleIndex(index)}> -
)); return ( diff --git a/src/views/components/common/ScheduleListItem/ScheduleListItem.tsx b/src/views/components/common/ScheduleListItem/ScheduleListItem.tsx index f8f31a15..d73f4b17 100644 --- a/src/views/components/common/ScheduleListItem/ScheduleListItem.tsx +++ b/src/views/components/common/ScheduleListItem/ScheduleListItem.tsx @@ -1,36 +1,38 @@ import clsx from 'clsx'; import React from 'react'; -import DropdownDrag from '~icons/material-symbols/drag-indicator'; +import DragIndicatorIcon from '~icons/material-symbols/drag-indicator'; import Text from '../Text/Text'; - export type Props = { style?: React.CSSProperties; active?: boolean; name: string; + dragHandleProps?: any; }; - - /** * This is a reusable dropdown component that can be used to toggle the visiblity of information */ export default function ScheduleListItem(props: Props) { - + const { dragHandleProps } = props; + console.log(props); return (
-
  • +
  • - +
    + +