mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
48 lines
839 B
Vue
48 lines
839 B
Vue
<script setup lang="ts">
|
|
const items = ref([
|
|
{
|
|
label: 'bug',
|
|
value: 'bug',
|
|
chip: {
|
|
color: 'error' as const
|
|
}
|
|
},
|
|
{
|
|
label: 'feature',
|
|
value: 'feature',
|
|
chip: {
|
|
color: 'success' as const
|
|
}
|
|
},
|
|
{
|
|
label: 'enhancement',
|
|
value: 'enhancement',
|
|
chip: {
|
|
color: 'info' as const
|
|
}
|
|
}
|
|
])
|
|
const label = ref([])
|
|
</script>
|
|
|
|
<template>
|
|
<UPopover :content="{ side: 'right', align: 'start' }">
|
|
<UButton
|
|
icon="i-heroicons-tag"
|
|
label="Select labels"
|
|
color="neutral"
|
|
variant="subtle"
|
|
/>
|
|
|
|
<template #content>
|
|
<UCommandPalette
|
|
v-model="label"
|
|
multiple
|
|
placeholder="Search labels..."
|
|
:groups="[{ id: 'labels', items }]"
|
|
:ui="{ input: '[&>input]:h-8' }"
|
|
/>
|
|
</template>
|
|
</UPopover>
|
|
</template>
|