Refactored some other component and cleanup

This commit is contained in:
Alexis
2026-03-30 22:12:03 +02:00
parent 83a7e14355
commit 3b81dea46c
4 changed files with 35 additions and 22 deletions

View File

@@ -10,16 +10,20 @@ const checked = defineModel<boolean>()
</script>
<template>
<label class="flex flex-row gap-1.5 items-center text-sm cursor-pointer">
<label class="flex flex-row gap-1.5 items-center text-sm cursor-pointer group">
<CheckboxRoot v-model="checked"
class="hover:bg-stone-100 flex size-4 appearance-none items-center justify-center rounded-xs bg-foreground shadow-sm border focus-within:ring-1 cursor-pointer">
<CheckboxIndicator class="size-full flex items-center justify-center bg-primary text-primary-foreground">
<PhCheck :size="10" weight="bold" />
</CheckboxIndicator>
</CheckboxRoot>
<span class="select-none">
<slot />
<small v-if="count">({{ count }})</small>
<span class="group-hover:underline underline-offset-2">
<slot />
</span>
<small v-if="count" class="ml-1 opacity-50">({{ count }})</small>
</span>
</label>
</template>