@@ -39,6 +39,32 @@ export function Field({
|
||||
);
|
||||
}
|
||||
|
||||
/** Validation message under a field. */
|
||||
export function FieldError({ message }: { message?: string }) {
|
||||
if (!message) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <p className="text-primary text-xs font-medium">{message}</p>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hidden field only bots fill in; the server rejects any submission that
|
||||
* has a value here.
|
||||
*/
|
||||
export function Honeypot() {
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
name="website"
|
||||
tabIndex={-1}
|
||||
autoComplete="off"
|
||||
aria-hidden="true"
|
||||
className="absolute -left-[9999px] h-0 w-0 opacity-0"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function TextInput({
|
||||
className,
|
||||
...props
|
||||
|
||||
Reference in New Issue
Block a user