@uva-glass/component-library
Version:
React components UvA
23 lines (22 loc) • 990 B
TypeScript
import { ReactNode } from 'react';
export interface FormInputProps {
/** The id of the input element. */
id: string;
/** label text if empthy the label is not renderd */
label: string;
/** label position `top` or `left`. The default is `top`. */
labelPosition?: 'top' | 'left';
/** The type of the input element. */
type?: 'text' | 'password' | 'email' | 'number';
/** Shows red * */
required?: boolean;
/** error text to display if set */
notValidatedText?: string;
/** Returns array of selected values as number */
onChange?: (value: string) => void;
/** Determines if the container wrapper is rendered. */
noContainer?: boolean;
/** Optional custom input that will replace the default input */
customInput?: ReactNode;
}
export declare const FormInput: ({ id, label, labelPosition, type, required, notValidatedText, onChange, noContainer, customInput, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;