fix(canvas): use lucide-react Undo2/Redo2 for the toolbar icons

The two hand-rolled curved-arrow SVGs I drew in bd5fd18 looked off — the
arrowheads were misaligned and the curve clipped at the bottom of the
viewBox. Swapped both for the canonical lucide-react icons (Undo2 /
Redo2), which match the visual weight + alignment of the rest of the
toolbar.

lucide-react was already in the OSS deps (added when other parts of the
app started using it). No new dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Montero Crespo 2026-05-08 12:19:50 -03:00
parent bd5fd18756
commit 0fcd6221b5
1 changed files with 3 additions and 26 deletions

View File

@ -1,6 +1,7 @@
import { useSimulatorStore, getEsp32Bridge } from '../../store/useSimulatorStore';
import React, { useEffect, useState, useRef, useCallback } from 'react';
import { createPortal } from 'react-dom';
import { Undo2, Redo2 } from 'lucide-react';
import { ESP32_ADC_PIN_MAP } from '../velxio-components/Esp32Element';
import { ComponentPickerModal } from '../ComponentPickerModal';
import { ComponentPropertyDialog } from './ComponentPropertyDialog';
@ -1922,19 +1923,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
}
aria-label="Undo"
>
<svg
width="18"
height="18"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M3 7v6h6" />
<path d="M3 13a9 9 0 1 0 3-7.7L3 8" />
</svg>
<Undo2 size={16} strokeWidth={2} aria-hidden="true" />
</button>
<button
onClick={() => redo()}
@ -1947,19 +1936,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
}
aria-label="Redo"
>
<svg
width="18"
height="18"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M21 7v6h-6" />
<path d="M21 13a9 9 0 1 1-3-7.7L21 8" />
</svg>
<Redo2 size={16} strokeWidth={2} aria-hidden="true" />
</button>
{/* Serial Monitor toggle */}