wass-rct-ui
Version:
A lightweight and customizable WASS Rct UI component library for modern web applications.
52 lines (51 loc) • 1.75 kB
TypeScript
/**
* @file wass-rct-ui
* @description A reusable Title component that supports dynamic heading levels.
* @author Web Apps Software Solutions
* @copyright © 2024 Web Apps Software Solutions. All rights reserved.
* @license MIT
* @repository https://github.com/WebAppSoftNK/wass-rct-ui
*/
import * as React from "react";
import { BaseColorVariant, InputType, SizeType } from "../types";
import { FieldProps } from "./Field";
export interface SelectOptionProps {
label: string;
value: string;
}
export interface FormInputProps {
fieldProps?: Partial<FieldProps>;
colorVariant?: BaseColorVariant;
sizeVariant?: SizeType;
isReadonly?: boolean;
fixedSize?: boolean;
rows?: number;
disabled?: boolean;
id?: string;
label?: string;
type: InputType;
name: string;
placeholder?: string;
value?: string;
defaultValue?: string;
options?: SelectOptionProps[];
checked?: boolean;
className?: string;
validationMessage?: string;
required?: boolean;
readOnly?: boolean;
minLength?: number;
maxLength?: number;
pattern?: string;
accept?: string;
multiple?: boolean;
step?: string | number;
onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
onFocus?: () => void;
onClick?: () => void;
}
declare const FormInput: React.FC<FormInputProps>;
export default FormInput;