docs(form): import types from @nuxt/ui

This commit is contained in:
Benjamin Canac
2025-02-04 14:56:49 +01:00
parent 10fb843f8f
commit 961711c7b7
7 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { FormError, FormSubmitEvent } from '#ui/types'
import type { FormError, FormSubmitEvent } from '@nuxt/ui'
const state = reactive({
email: undefined,

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import Joi from 'joi'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = Joi.object({
email: Joi.string().required(),

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { FormError, FormErrorEvent, FormSubmitEvent } from '#ui/types'
import type { FormError, FormErrorEvent, FormSubmitEvent } from '@nuxt/ui'
const state = reactive({
email: undefined,

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { object, string, nonempty, refine, type Infer } from 'superstruct'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = object({
email: nonempty(string()),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import * as v from 'valibot'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = v.object({
email: v.pipe(v.string(), v.email('Invalid email')),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { object, string, type InferType } from 'yup'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = object({
email: string().email('Invalid email').required('Required'),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import * as z from 'zod'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({
email: z.string().email('Invalid email'),