mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 10:50:40 +01:00
feat(Select): new component (#92)
This commit is contained in:
@@ -38,7 +38,7 @@ import { reactivePick } from '@vueuse/core'
|
||||
import { useId, useAppConfig, useFormField } from '#imports'
|
||||
|
||||
const props = defineProps<SwitchProps>()
|
||||
defineSlots<SwitchSlots>()
|
||||
const slots = defineSlots<SwitchSlots>()
|
||||
|
||||
const modelValue = defineModel<boolean | undefined>({ default: undefined })
|
||||
|
||||
@@ -86,13 +86,13 @@ async function onChecked() {
|
||||
</SwitchThumb>
|
||||
</SwitchRoot>
|
||||
</div>
|
||||
<div v-if="(label || $slots.label) || (description || $slots.description)" :class="ui.wrapper()">
|
||||
<Label v-if="label || $slots.label" :for="id" :class="ui.label()">
|
||||
<div v-if="(label || !!slots.label) || (description || !!slots.description)" :class="ui.wrapper()">
|
||||
<Label v-if="label || !!slots.label" :for="id" :class="ui.label()">
|
||||
<slot name="label" :label="label">
|
||||
{{ label }}
|
||||
</slot>
|
||||
</Label>
|
||||
<p v-if="description || $slots.description" :class="ui.description()">
|
||||
<p v-if="description || !!slots.description" :class="ui.description()">
|
||||
<slot name="description" :description="description">
|
||||
{{ description }}
|
||||
</slot>
|
||||
|
||||
Reference in New Issue
Block a user