Skip to content

Commit

Permalink
limiting cards to show maximum of 4 calendars before adding a scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Nov 18, 2024
1 parent 7cdbbe8 commit e798eea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export function CalendarCard({
cardOrientation === 'row'
? isNarrowWidth
? 'auto'
: data?.calendarData.length > 6
: data?.calendarData.length > 4
? 'auto'
: 'hidden'
: 'hidden',
Expand All @@ -284,8 +284,8 @@ export function CalendarCard({
cardOrientation === 'row'
? isNarrowWidth
? `${data?.calendarData.length * 100}%`
: data?.calendarData.length > 6
? `${100 + ((data?.calendarData.length - 6) % 6) * 17}%`
: data?.calendarData.length > 4
? `${100 + ((data?.calendarData.length - 4) % 4) * 25}%`
: 'auto'
: 'auto',
}}
Expand Down

0 comments on commit e798eea

Please sign in to comment.