feat(ColorPicker): implement component (#2670)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Alex
2024-12-05 18:11:43 +05:00
committed by GitHub
parent 3e283117d2
commit e475b6438d
14 changed files with 966 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
const color = ref('#00C16A')
const chip = computed(() => ({ backgroundColor: color.value }))
</script>
<template>
<UPopover>
<UButton label="Choose color" color="neutral" variant="outline">
<template #leading>
<span :style="chip" class="size-3 rounded-full" />
</template>
</UButton>
<template #content>
<UColorPicker v-model="color" class="p-2" />
</template>
</UPopover>
</template>