mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
feat(Slider): new component (#57)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user