Skip to content

Commit 8c6ac69

Browse files
committed
fix bugs + add note functionality
1 parent 76c87d4 commit 8c6ac69

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

src/components/dot.svelte

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
}
1313
1414
let color = $state();
15+
let note = $state("")
1516
1617
$effect(() => {
1718
if (dotNum < nowDots) {
@@ -21,51 +22,58 @@
2122
} else {
2223
color = 'bg-inactive';
2324
}
24-
});
25+
})
2526
2627
$inspect(color);
28+
29+
2730
</script>
2831

2932
{#snippet picker()}
30-
<div popover class="bg-bg border-text rounded-xl border-1 p-4 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 backdrop:backdrop-blur-sm backdrop:transition-all" bind:this={popover}>
33+
<div popover class="bg-bg border-text rounded-xl border-1 p-4 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 backdrop:backdrop-blur-sm transition-all open:flex flex-row items-center gap-3" bind:this={popover}>
34+
<!-- svelte-ignore a11y_click_events_have_key_events -->
35+
<!-- svelte-ignore a11y_no_static_element_interactions -->
36+
3137
<div class="flex flex-row gap-1">
32-
<button aria-label="Red"
38+
<div aria-label="Red"
3339
class="bg-red h-6 w-3 rounded-full transition-all hover:w-6"
3440
onclick={() => {
3541
color = 'bg-red';
3642
}}
37-
></button>
38-
<button aria-label="Yellow"
43+
></div>
44+
<div aria-label="Yellow"
3945
class="bg-yellow h-6 w-3 rounded-full transition-all hover:w-6"
4046
onclick={() => {
4147
color = 'bg-yellow';
4248
}}
43-
></button>
44-
<button aria-label="Green"
49+
></div>
50+
<div aria-label="Green"
4551
class="bg-green h-6 w-3 rounded-full transition-all hover:w-6"
4652
onclick={() => {
4753
color = 'bg-green';
4854
}}
49-
></button>
50-
<button aria-label="Blue"
55+
></div>
56+
<div aria-label="Blue"
5157
class="bg-blue h-6 w-3 rounded-full transition-all hover:w-6"
5258
onclick={() => {
5359
color = 'bg-blue';
5460
}}
55-
></button>
56-
<button aria-label="Primary"
61+
></div>
62+
<div aria-label="Primary"
5763
class="bg-primary h-6 w-3 rounded-full transition-all hover:w-6"
5864
onclick={() => {
5965
color = 'bg-primary';
6066
}}
61-
></button>
62-
<button aria-label="Inactive"
67+
></div>
68+
<div aria-label="Inactive"
6369
class="bg-inactive h-6 w-3 rounded-full transition-all hover:w-6"
6470
onclick={() => {
6571
color = 'bg-inactive';
6672
}}
67-
></button>
73+
></div>
6874
</div>
75+
<div class="w-[1px] h-10 bg-text"></div>
76+
<input type="text" bind:value={note} placeholder="add a note..." class="bg-inactive rounded-lg text-text h-8 text-md w-70">
6977
</div>
7078
{/snippet}
7179

0 commit comments

Comments
 (0)