feat(Slider): new component (#57)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Romain Hamel
2024-04-15 16:15:29 +02:00
committed by GitHub
parent 820417956e
commit 78e45600de
10 changed files with 414 additions and 3 deletions

View File

@@ -22,8 +22,8 @@ const schema = z.object({
}),
radioGroup: z.string().refine(value => value === 'option-2', {
message: 'Select Option 2'
})
// range: z.number().max(20, { message: 'Must be less than 20' })
}),
slider: z.number().max(20, { message: 'Must be less than 20' })
})
type Schema = z.output<typeof schema>
@@ -70,6 +70,10 @@ function onSubmit(event: FormSubmitEvent<Schema>) {
<USwitch v-model="state.switch" />
</UFormField>
<UFormField name="slider">
<USlider v-model="state.slider" />
</UFormField>
<div class="flex gap-2">
<UButton color="gray" type="submit" :disabled="form?.disabled">
Submit