import { Magnet } from "lucide-react"; import React, { HTMLProps } from "react"; import { cn } from "../../hooks"; export interface TimelineCursorProps extends HTMLProps { /** Position as percentage (0-100) */ left?: number; /** Label text to display */ label?: string; /** Cursor color */ color?: string; /** Whether to show the readout tooltip */ showReadout?: boolean; /** Whether to show magnet icon (only when showReadout is true) */ showMagnet?: boolean; /** Readout variant - 'active' for interactive cursors, 'static' for fixed markers */ variant?: "active" | "static"; /** Additional CSS classes */ className?: string; /** Z-index override */ zIndex?: number; } /** * Simple timeline cursor component. * * @example * // Simple cursor line * * * // Cursor with readout * */ export function CursorOverlay({ left = 0, label, color, showReadout = false, showMagnet = false, variant = "active", zIndex = 20, }: TimelineCursorProps) { const leftValue = `${left}%`; // Default colors based on variant const lineColor = color || (variant === "active" ? "rgb(239 68 68)" : "rgb(148 163 184)"); return ( <> {/* Cursor Line */}
{/* Readout Tooltip */} {showReadout && (
{showMagnet && ( )} {label}
)} ); }