import React from 'react'; import { type QuickLabel, getLabelColors, quickLabelShortcutDigit } from '../utils/quickLabels'; /** * Shared vertical label list used by both FloatingQuickLabelPicker * and the AnnotationToolbar's inline dropdown. * * Context-menu style: single column, colored accent bars, full-width rows. */ export const QuickLabelDropdown: React.FC<{ labels: QuickLabel[]; onSelect: (label: QuickLabel) => void; /** Enable staggered row entrance animation */ animate?: boolean; }> = ({ labels, onSelect, animate = false }) => { return (
e.stopPropagation()}> {animate && ( )} {labels.map((label, index) => { const colors = getLabelColors(label.color); const digit = quickLabelShortcutDigit(index); return ( ); })}
); };