@clubmed/trident-ui
Version:
Shared ClubMed React UI components
14 lines (13 loc) • 927 B
TypeScript
import type { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
import { type ValidationStatus } from '../../hooks/useInternalStatus';
import { type FormLabelProps } from './FormLabel';
export type FormControlProps<Value = unknown, Attributes extends HTMLAttributes<HTMLElement> = InputHTMLAttributes<HTMLInputElement>> = {
value?: Value;
label?: ReactNode;
validationStatus?: ValidationStatus;
onChange?: (name: string, value: Value) => void;
dataTestId?: string;
dataName?: string;
errorMessage?: string;
} & Omit<Attributes & Partial<FormLabelProps>, 'onChange' | 'value'>;
export declare const FormControl: <Value = string>({ id, label, description, disabled, required, className, validationStatus, children, errorMessage, dataTestId, dataName, hideRequiredStar, layout, }: FormControlProps<Value, InputHTMLAttributes<HTMLInputElement>>) => import("react/jsx-runtime").JSX.Element;