Files
ui/docs/components/content/examples/RadioGroupLabelExample.vue
Romain Hamel 23d5dc7b98 feat(RadioGroup): new component (#730)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2023-10-27 15:47:24 +02:00

21 lines
533 B
Vue

<script setup>
const options = [
{ value: 'email', label: 'Email', icon: 'i-heroicons-at-symbol' },
{ value: 'sms', label: 'Phone (SMS)', icon: 'i-heroicons-phone' },
{ value: 'push', label: 'Push notification', icon: 'i-heroicons-bell' }
]
const selected = ref('sms')
</script>
<template>
<URadioGroup v-model="selected" :options="options">
<template #label="{ option }">
<p class="italic">
<UIcon :name="option.icon" />
{{ option.label }}
</p>
</template>
</URadioGroup>
</template>