diff options
| author | Uri Shaked | 2019-12-07 13:13:16 +0200 |
|---|---|---|
| committer | Uri Shaked | 2019-12-07 13:13:16 +0200 |
| commit | bf0dc3c9835eaec056f3f309728818429dede004 (patch) | |
| tree | f61aa3f36e1a0bc0b9b2f09aceee86eff260044c /demo/src/index.ts | |
| parent | feat(usart): add onLineTransmit callback (diff) | |
| download | avr8js-bf0dc3c9835eaec056f3f309728818429dede004.tar.gz avr8js-bf0dc3c9835eaec056f3f309728818429dede004.tar.bz2 avr8js-bf0dc3c9835eaec056f3f309728818429dede004.zip | |
refactor(demo): use LED from @wokwi/elements
Diffstat (limited to 'demo/src/index.ts')
| -rw-r--r-- | demo/src/index.ts | 10 |
1 files changed, 4 insertions, 6 deletions
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<LEDElement>('wokwi-led[color=green]'); +const led12 = document.querySelector<LEDElement>('wokwi-led[color=red]'); // Set up toolbar let runner: AVRRunner; |
