mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-07 13:11:49 +02:00
💄 Only make date sticky if there are multiple time slots
This commit is contained in:
parent
9564a5159c
commit
44f01c116e
1 changed files with 3 additions and 6 deletions
|
@ -114,15 +114,12 @@ const PollHeader: React.FunctionComponent = () => {
|
||||||
width: 80,
|
width: 80,
|
||||||
maxWidth: 90,
|
maxWidth: 90,
|
||||||
height: dayRowHeight,
|
height: dayRowHeight,
|
||||||
// could enable this to make the date column sticky
|
left: firstOfDay && !lastOfDay ? 240 : 0,
|
||||||
left: firstOfDay ? 240 : 0,
|
|
||||||
top: monthRowHeight,
|
top: monthRowHeight,
|
||||||
}}
|
}}
|
||||||
className={cn(
|
className={cn(
|
||||||
"sticky space-y-2 align-top",
|
"sticky space-y-2 bg-white align-top",
|
||||||
firstOfDay
|
firstOfDay ? "z-20" : "z-10",
|
||||||
? "z-20 bg-gradient-to-r from-transparent to-white"
|
|
||||||
: "z-10 bg-white",
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{firstOfDay ? null : <Trail end={lastOfDay} />}
|
{firstOfDay ? null : <Trail end={lastOfDay} />}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue