File tree 5 files changed +11
-9
lines changed
5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 15
15
{#each Array (voices ) as _ }
16
16
<Voice />
17
17
{/each }
18
- <div class =" card variant-soft-secondary" >
19
- < button class = "btn btn-primary" on:click ={() => ( voices += 1 )}> Add Voice</button >
20
- <!-- <button class="btn btn-secondary" on:click={() => voices -= 1}>Remove Voice</button> -- >
21
- </ div >
18
+ <button class ="py-4 card variant-soft-secondary w-full" on:click ={() => ( voices += 1 )}
19
+ > Add Voice</button
20
+ >
21
+ <!-- <button class="btn btn-secondary" on:click={() => voices -= 1}>Remove Voice</button> -- >
22
22
</div >
Original file line number Diff line number Diff line change 9
9
10
10
let osc: Tone .Oscillator | undefined = undefined ;
11
11
12
- $ : status = ' ⏹' ;
13
- // $: status = osc?.state == 'started' ? '⏹' : '▶';
12
+ $ : status = osc ?.state == ' started' ? ' /stop.svg' : ' /play.svg' ;
14
13
15
14
onMount (() => {
16
15
if (osc ) return ;
23
22
const toggleOsc = () => {
24
23
if (! osc ) return ;
25
24
osc .state === ' started' ? osc .stop () : osc .start ();
26
- status = osc .state === ' started' ? ' ⏹ ' : ' ▶ ' ;
25
+ status = osc .state === ' started' ? ' /stop.svg ' : ' /play.svg ' ;
27
26
};
28
27
</script >
29
28
30
29
<div class =" card variant-ghost p-4 w-full flex flex-col h-full mx-auto justify-center items-center" >
31
30
{#if osc }
31
+ <p >Voice</p >
32
32
<button on:click ={toggleOsc } type =" button" class =" btn btn-icon variant-ghost uppercase" >
33
- {status }
33
+ < img src = {status } alt = " " />
34
34
</button >
35
35
36
36
{#if osc .state === ' started' }
Original file line number Diff line number Diff line change 4
4
</script >
5
5
6
6
<div class =" p-4 w-full space-y-4" >
7
- <button class ="btn variant-ghost w-full" on:click ={() => (start = ! start )}
7
+ <button class ="btn variant-soft-primary w-full" on:click ={() => (start = ! start )}
8
8
>{start ? ' Stop' : ' Start' }</button
9
9
>
10
10
{#if start }
You can’t perform that action at this time.
0 commit comments