Update InputFormAutoAnimate.vue

fix: add Toaster
This commit is contained in:
Kirill 2024-11-18 07:53:55 +03:00 committed by GitHub
parent ac69980ac9
commit cb66b17fae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ import {
FormMessage, FormMessage,
} from '@/lib/registry/new-york/ui/form' } from '@/lib/registry/new-york/ui/form'
import { Input } from '@/lib/registry/new-york/ui/input' import { Input } from '@/lib/registry/new-york/ui/input'
import { toast } from '@/lib/registry/new-york/ui/toast' import { toast, Toaster } from '@/lib/registry/new-york/ui/toast'
import { vAutoAnimate } from '@formkit/auto-animate/vue' import { vAutoAnimate } from '@formkit/auto-animate/vue'
import { toTypedSchema } from '@vee-validate/zod' import { toTypedSchema } from '@vee-validate/zod'
@ -34,6 +34,7 @@ const onSubmit = handleSubmit((values) => {
</script> </script>
<template> <template>
<Toaster />
<form class="w-2/3 space-y-6" @submit="onSubmit"> <form class="w-2/3 space-y-6" @submit="onSubmit">
<FormField v-slot="{ componentField }" name="username" :validate-on-blur="!isFieldDirty"> <FormField v-slot="{ componentField }" name="username" :validate-on-blur="!isFieldDirty">
<FormItem v-auto-animate> <FormItem v-auto-animate>