From 27ad6eb9bdd277276c60013aa8db4aaff02d8e87 Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Sun, 11 Dec 2022 10:00:41 -0500 Subject: [PATCH] icons --- src/tone.js | 2 -- src/ui.js | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/tone.js b/src/tone.js index a4964eb..cf11e95 100644 --- a/src/tone.js +++ b/src/tone.js @@ -1,5 +1,3 @@ -import React from "react"; - // setup audio context const AudioContextConstructor = window.AudioContext || window.webkitAudioContext; const Context = new AudioContextConstructor(); diff --git a/src/ui.js b/src/ui.js index 30cdc6e..ac715c2 100644 --- a/src/ui.js +++ b/src/ui.js @@ -131,13 +131,19 @@ export const Controls =()=> - <${Button} onClick=${()=>playSet(1)} disabled=${playGet==1} icon=${"p!"}>Play + <${Button} onClick=${()=>playSet(1)} disabled=${playGet==1} icon=${html``}>Play
Mark
- <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:true })}>Response - <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:false})}>No Response - <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:null })} disabled=${State.Live.Mark == undefined}>Clear + <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:true })} icon=${html`<${Mark} right=${State.Chan.Value} response=${true} x="0" y="0" classes="stroke(white 2 draw) w-2 h-2 translate-x-1/2 translate-y-1/2"/>`}>Response + <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:false})} icon=${html`<${Mark} right=${State.Chan.Value} response=${false} x="0" y="0" classes="stroke(white 2 draw) w-2 h-2 translate-x-1/2 translate-y-1/2"/>`}>No Response + <${Button} + icon=${html` + + + `} + onClick=${()=>Dispatch({Name:"Mark", Data:null })} + disabled=${State.Live.Mark == undefined}>Clear
`; }; @@ -233,8 +239,8 @@ const Glyph = { ${children}`, O: ({children})=> html` - - ${children}` + + ${children}` }; /** @type {({right, response, x, y, classes}:{right:boolean, response?:boolean, x:number|string, y:number|string, classes:string})=>preact.VNode} */