Skip to content

Commit a17c86d

Browse files
committed
fix: remove unused popoverRef
1 parent 553d82d commit a17c86d

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

app/components/AccentColorPicker.vue

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
<script setup lang="ts">
2-
import { useAccentColor, type AppSettings } from '~/composables/useSettings'
2+
import { useAccentColor } from '~/composables/useSettings'
33
44
const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
5-
6-
const popoverRef = ref<HTMLElement | null>(null)
7-
8-
function applyColor(id: AppSettings['accentColorId']) {
9-
setAccentColor(id)
10-
popoverRef.value?.hidePopover()
11-
}
125
</script>
136

147
<template>
@@ -22,13 +15,13 @@ function applyColor(id: AppSettings['accentColorId']) {
2215
:aria-label="color.name"
2316
class="size-6 rounded-full transition-transform duration-150 hover:scale-110 focus-ring aria-selected:(ring-2 ring-fg ring-offset-2 ring-offset-bg-subtle)"
2417
:style="{ backgroundColor: color.value }"
25-
@click="applyColor(color.id)"
18+
@click="setAccentColor(color.id)"
2619
/>
2720
<button
2821
type="button"
2922
aria-label="Clear accent color"
3023
class="size-6 rounded-full transition-transform duration-150 hover:scale-110 focus-ring flex items-center justify-center bg-accent-fallback"
31-
@click="applyColor(null)"
24+
@click="setAccentColor(null)"
3225
>
3326
<span class="i-carbon-error size-4 text-bg" />
3427
</button>

0 commit comments

Comments
 (0)