22 lines
589 B
TypeScript
22 lines
589 B
TypeScript
import { FormEventHandler, ReactNode } from "react";
|
|
import { ZodSchema } from "zod";
|
|
|
|
export interface FloatingLabelInputProps {
|
|
label: string;
|
|
placeholder?: string;
|
|
type: 'text' | 'password' | 'select' | 'email' | 'number';
|
|
options?: string[];
|
|
button?: React.ReactNode;
|
|
showPasswordToggle?: boolean;
|
|
name: string;
|
|
defaultValue?: string;
|
|
}
|
|
|
|
export interface FormProps {
|
|
title?: string,
|
|
fields: FloatingLabelInputProps[],
|
|
submit: FormEventHandler<HTMLFormElement> | undefined,
|
|
className: string,
|
|
child: ReactNode,
|
|
schema: ZodSchema
|
|
} |