Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
424 B · 15 lines
TSX
at commit befbe0c4
12345678910111213141516type InputProps = { label: string name: string error?: string | undefined} & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>
export function Input({ label, name, error, ...props }: InputProps) { return ( <> <label htmlFor={name}>{label}</label> <input name={name} id={name} {...props} /> {error ? <span role="alert">{error}</span> : null} </> )}