2026-01-20 09:02:26 -06:00

22 lines
389 B
TypeScript

import { JSX } from "preact";
interface FormFieldProps {
label: string;
required?: boolean;
children: JSX.Element;
}
export function FormField(
{ label, required = false, children }: FormFieldProps,
) {
return (
<div>
<label class="block text-sm font-medium text-gray-700">
{label}
{required && " *"}
</label>
{children}
</div>
);
}