ignore folder
This commit is contained in:
23
components/ui/FormField.tsx
Normal file
23
components/ui/FormField.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
type Option = { label: string; value: string };
|
||||
|
||||
type Props = {
|
||||
label: string;
|
||||
children?: ReactNode;
|
||||
type?: "text" | "password" | "checkbox" | "textarea" | "select";
|
||||
value?: string | boolean;
|
||||
onValueChange?: (value: string) => void;
|
||||
options?: Option[];
|
||||
placeholder?: string;
|
||||
rows?: number;
|
||||
};
|
||||
|
||||
export default function FormField({ label, children, type = "text", ...props }: Props) {
|
||||
return (
|
||||
<label className="form-label">
|
||||
{label}
|
||||
{children}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user