import { Pin } from 'lucide-react'; import type { ReactNode } from 'react'; import { fs } from '../Planner/bookings/bookingParts'; import { tintOf } from '../Planner/planParts'; import { Tooltip } from '../shared/Tooltip'; /** * The head band of a shared note, tinted by its category's colour: the * category as a dot (its name in the tooltip), the title, a pin when it is * pinned and whatever the caller puts at the end (the note card's link, menu * and author). The Collab tab and the assistant chat's note cards draw it. */ export function NoteHeadBand({ title, color, category, pinned, bordered, trailing, titleClassName = '', }: { title: ReactNode; /** The category's colour, already checked. */ color: string; category: string | null; pinned: boolean; /** A line under the band, when a body follows. */ bordered: boolean; trailing?: ReactNode; /** Extra classes for the title (struck through for a note about to go). */ titleClassName?: string; }) { return (
{/* The category is only its colour here; the name is in the tooltip and the filter above. */} {category && ( )} {title} {pinned && } {trailing}
); }