import type { EmailField } from '@payloadcms/plugin-form-builder/types' import type { FieldErrorsImpl, FieldValues, UseFormRegister } from 'react-hook-form' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import React from 'react' import { Error } from '../Error' import { Width } from '../Width' export const Email: React.FC< EmailField & { errors: Partial register: UseFormRegister } > = ({ name, defaultValue, errors, label, register, required, width }) => { return ( {errors[name] && } ) }