File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
2- import { useAccentColor , type AppSettings } from ' ~/composables/useSettings'
2+ import { useAccentColor } from ' ~/composables/useSettings'
33
44const { 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 >
You can’t perform that action at this time.
0 commit comments