From bf0dc3c9835eaec056f3f309728818429dede004 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sat, 7 Dec 2019 13:13:16 +0200 Subject: refactor(demo): use LED from @wokwi/elements --- demo/src/index.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'demo/src/index.ts') diff --git a/demo/src/index.ts b/demo/src/index.ts index a173f04..4b25626 100644 --- a/demo/src/index.ts +++ b/demo/src/index.ts @@ -1,9 +1,10 @@ +import '@wokwi/elements'; import { buildHex } from './compile'; import { AVRRunner } from './execute'; import { formatTime } from './format-time'; import './index.css'; -import { LED } from './led'; import { CPUPerformance } from './cpu-performance'; +import { LEDElement } from '@wokwi/elements'; let editor: any; const BLINK_CODE = ` @@ -38,11 +39,8 @@ window.require(['vs/editor/editor.main'], () => { }); // Set up LEDs -const leds = document.querySelector('.leds'); -const led13 = new LED({ color: 'green', lightColor: '#80ff80' }); -const led12 = new LED({ color: 'red', lightColor: '#ff8080' }); -leds.appendChild(led13.el); -leds.appendChild(led12.el); +const led13 = document.querySelector('wokwi-led[color=green]'); +const led12 = document.querySelector('wokwi-led[color=red]'); // Set up toolbar let runner: AVRRunner; -- cgit v1.2.3