fix: make Line tool button static next to Rect and Span

This commit is contained in:
Marko Djordjevic 2026-02-17 19:42:21 +01:00
parent 04a8303f4f
commit 0ba3592679

View file

@ -183,21 +183,16 @@ export default function Toolbox({
> >
<Layers className="w-3.5 h-3.5" /> Span <Layers className="w-3.5 h-3.5" /> Span
</button> </button>
{annotationTypes <button
.filter((t) => t.category === 'line') onClick={() => handleToolClick('line')}
.map((type) => ( className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
<button activeTool === 'line'
key={type.id} ? 'bg-primary text-primary-foreground'
onClick={() => handleToolClick(type.name)} : 'bg-secondary/50 hover:bg-secondary text-muted-foreground hover:text-foreground'
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${ }`}
activeTool === type.name >
? 'bg-primary text-primary-foreground' <Minus className="w-3.5 h-3.5" /> Line
: 'bg-secondary/50 hover:bg-secondary text-muted-foreground hover:text-foreground' </button>
}`}
>
<Minus className="w-3.5 h-3.5" /> Line
</button>
))}
<button <button
onClick={() => handleToolClick('delete')} onClick={() => handleToolClick('delete')}
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${ className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${