Skip to content

Commit 2dd3486

Browse files
committed
fix: icons
1 parent f072d42 commit 2dd3486

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

src/lib/synth.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
{#each Array(voices) as _}
1616
<Voice />
1717
{/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> -->
2222
</div>

src/lib/voice.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
1010
let osc: Tone.Oscillator | undefined = undefined;
1111
12-
$: status = '';
13-
// $: status = osc?.state == 'started' ? '⏹' : '▶';
12+
$: status = osc?.state == 'started' ? '/stop.svg' : '/play.svg';
1413
1514
onMount(() => {
1615
if (osc) return;
@@ -23,14 +22,15 @@
2322
const toggleOsc = () => {
2423
if (!osc) return;
2524
osc.state === 'started' ? osc.stop() : osc.start();
26-
status = osc.state === 'started' ? '' : '';
25+
status = osc.state === 'started' ? '/stop.svg' : '/play.svg';
2726
};
2827
</script>
2928

3029
<div class="card variant-ghost p-4 w-full flex flex-col h-full mx-auto justify-center items-center">
3130
{#if osc}
31+
<p>Voice</p>
3232
<button on:click={toggleOsc} type="button" class="btn btn-icon variant-ghost uppercase">
33-
{status}
33+
<img src={status} alt="" />
3434
</button>
3535

3636
{#if osc.state === 'started'}

src/routes/+page.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</script>
55

66
<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)}
88
>{start ? 'Stop' : 'Start'}</button
99
>
1010
{#if start}

static/play.svg

+1
Loading

static/stop.svg

+1
Loading

0 commit comments

Comments
 (0)