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:
parent
bd5fd18756
commit
0fcd6221b5
|
|
@ -1,6 +1,7 @@
|
||||||
import { useSimulatorStore, getEsp32Bridge } from '../../store/useSimulatorStore';
|
import { useSimulatorStore, getEsp32Bridge } from '../../store/useSimulatorStore';
|
||||||
import React, { useEffect, useState, useRef, useCallback } from 'react';
|
import React, { useEffect, useState, useRef, useCallback } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
|
import { Undo2, Redo2 } from 'lucide-react';
|
||||||
import { ESP32_ADC_PIN_MAP } from '../velxio-components/Esp32Element';
|
import { ESP32_ADC_PIN_MAP } from '../velxio-components/Esp32Element';
|
||||||
import { ComponentPickerModal } from '../ComponentPickerModal';
|
import { ComponentPickerModal } from '../ComponentPickerModal';
|
||||||
import { ComponentPropertyDialog } from './ComponentPropertyDialog';
|
import { ComponentPropertyDialog } from './ComponentPropertyDialog';
|
||||||
|
|
@ -1922,19 +1923,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
|
||||||
}
|
}
|
||||||
aria-label="Undo"
|
aria-label="Undo"
|
||||||
>
|
>
|
||||||
<svg
|
<Undo2 size={16} strokeWidth={2} aria-hidden="true" />
|
||||||
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>
|
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => redo()}
|
onClick={() => redo()}
|
||||||
|
|
@ -1947,19 +1936,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
|
||||||
}
|
}
|
||||||
aria-label="Redo"
|
aria-label="Redo"
|
||||||
>
|
>
|
||||||
<svg
|
<Redo2 size={16} strokeWidth={2} aria-hidden="true" />
|
||||||
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>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Serial Monitor toggle */}
|
{/* Serial Monitor toggle */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue