mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
31 lines
643 B
Vue
31 lines
643 B
Vue
<script setup lang="ts">
|
|
const open = ref(false)
|
|
|
|
const users = [
|
|
{ id: 1, label: 'Durward Reynolds' },
|
|
{ id: 2, label: 'Kenton Towne' },
|
|
{ id: 3, label: 'Therese Wunsch' },
|
|
{ id: 4, label: 'Benedict Kessler' },
|
|
{ id: 5, label: 'Katelyn Rohan' }
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<UModal v-model:open="open">
|
|
<UButton
|
|
label="Search users..."
|
|
color="gray"
|
|
variant="subtle"
|
|
icon="i-heroicons-magnifying-glass"
|
|
/>
|
|
|
|
<template #content>
|
|
<UCommandPalette
|
|
close
|
|
:groups="[{ id: 'users', items: users }]"
|
|
@update:open="open = $event"
|
|
/>
|
|
</template>
|
|
</UModal>
|
|
</template>
|