mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
fix(planner): give day plan rows their full width until the controls are wanted
The hover controls took their room at rest, so a place's line and a note's text broke early. A place now gives way only while hovered, a note's controls fade in over the end of its text in the note's own colour, and a picked place shows none. All three controls of a place come out together: the add-booking ticket waited for a React hover state and came a beat late. A click no longer leaves them showing; keyboard focus and an open menu do.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { CSSProperties } from 'react'
|
||||
|
||||
/**
|
||||
* The four surfaces a note colour produces (#1629).
|
||||
*
|
||||
@@ -34,3 +36,12 @@ export function noteSurface(color: string | null | undefined): NoteSurface {
|
||||
iconColor: color,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A day's activity area in the plan: its tint as the background, and named as
|
||||
* a variable for the note fades drawn over it (dayPlanRows.css), so a fade
|
||||
* matches a day a plugin has tinted too.
|
||||
*/
|
||||
export function dayBodyStyle(tint: string | null | undefined): CSSProperties {
|
||||
return { background: tint ?? undefined, '--dp-day-tint': tint ?? 'transparent' } as CSSProperties
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user