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
</button>
{annotationTypes
.filter((t) => t.category === 'line')
.map((type) => (
<button
key={type.id}
onClick={() => handleToolClick(type.name)}
onClick={() => handleToolClick('line')}
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
activeTool === type.name
activeTool === 'line'
? 'bg-primary text-primary-foreground'
: 'bg-secondary/50 hover:bg-secondary text-muted-foreground hover:text-foreground'
}`}
>
<Minus className="w-3.5 h-3.5" /> Line
</button>
))}
<button
onClick={() => handleToolClick('delete')}
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${