Skip to content

Commit

Permalink
added plus/minus switching
Browse files Browse the repository at this point in the history
  • Loading branch information
lovretomic committed Dec 22, 2024
1 parent ea337e4 commit 23e890c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/web/src/components/ScheduleSection/ScheduleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { EventWithSpeakerDto } from '@ddays-app/types';
import { useEffect, useState } from 'react';
import MinusSvg from 'assets/icons/minus-black.svg';
import PlusSvg from 'assets/icons/plus-black.svg';
import { useEffect, useState } from 'react';

import { useScreenSize } from '../../hooks/useScreenSize';
import ScheduleImageCard from './ScheduleImageCard';
import c from './ScheduleSection.module.scss';
import {
getEventTime,
getEventTypeTranslation,
getSpeakerCompanyStringForEvent,
getThemeShort,
} from './utils';
import ScheduleImageCard from './ScheduleImageCard';

type ScheduleCardProps = {
event: EventWithSpeakerDto;
Expand Down Expand Up @@ -170,7 +171,11 @@ const ScheduleCard: React.FC<ScheduleCardProps> = ({
<div className={c.scheduleCardRight}>
{event.description && (
<button className={c.plusButton}>
<img src={PlusSvg} alt='plus' />
{isOpenDescription ? (
<img src={MinusSvg} alt='minus' />
) : (
<img src={PlusSvg} alt='plus' />
)}
</button>
)}
</div>
Expand Down

0 comments on commit 23e890c

Please sign in to comment.