2026-03-14 06:35:48 +07:00
|
|
|
import './Esp32Element';
|
2026-03-15 08:55:13 +07:00
|
|
|
import type { BoardKind } from '../../types/board';
|
2026-03-14 06:35:48 +07:00
|
|
|
|
|
|
|
|
interface Esp32Props {
|
|
|
|
|
id?: string;
|
|
|
|
|
x?: number;
|
|
|
|
|
y?: number;
|
2026-03-15 08:55:13 +07:00
|
|
|
boardKind?: BoardKind;
|
2026-03-14 06:35:48 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
namespace JSX {
|
|
|
|
|
interface IntrinsicElements {
|
2026-04-22 02:45:45 +07:00
|
|
|
'velxio-esp32': any;
|
2026-03-14 06:35:48 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-15 08:55:13 +07:00
|
|
|
export const Esp32 = ({ id = 'esp32', x = 0, y = 0, boardKind = 'esp32' }: Esp32Props) => (
|
2026-04-22 02:45:45 +07:00
|
|
|
<velxio-esp32
|
2026-03-14 06:35:48 +07:00
|
|
|
id={id}
|
2026-03-15 08:55:13 +07:00
|
|
|
board-kind={boardKind}
|
2026-03-14 06:35:48 +07:00
|
|
|
style={{ position: 'absolute', left: `${x}px`, top: `${y}px` }}
|
|
|
|
|
/>
|
|
|
|
|
);
|