MCPcopy Create free account
hub / github.com/WardAnalytics/WardGraph / AuthInput

Function AuthInput

src/components/auth/AuthInput.tsx:8–36  ·  view source on GitHub ↗
({ label, name, ...rest }: AuthInputProps)

Source from the content-addressed store, hash-verified

6}
7
8const AuthInput = ({ label, name, ...rest }: AuthInputProps) => {
9 const {
10 register,
11 formState: { errors },
12 } = useFormContext();
13
14 const error = errors[name];
15
16 return (
17 <div>
18 <label
19 htmlFor={label}
20 className="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
21 >
22 {label}
23 </label>
24 <input
25 {...register(name)}
26 {...rest}
27 className={
28 "block w-full rounded-md border-0 py-1.5 text-sm leading-6 text-gray-900 ring-1 ring-inset ring-gray-300 transition-all placeholder:text-gray-400 focus:outline focus:outline-[3px] focus:outline-blue-200 focus:ring-2 focus:ring-blue-400"
29 }
30 />
31 {error && (
32 <p className="mt-2 text-xs text-red-500">{error.message?.toString()}</p>
33 )}
34 </div>
35 );
36};
37
38export default AuthInput;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected