UNPKG

@gpa-gemstone/react-forms

Version:
49 lines (48 loc) 1.32 kB
import * as React from 'react'; import { Gemstone } from '@gpa-gemstone/application-typings'; interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> { /** * Function to determine the validity of a field * @param field - Field of the record to check * @returns {boolean} */ Valid: (field: keyof T) => boolean; /** * Feedback message to show when input is invalid * @type {string} * @optional */ Feedback?: string; /** * Type of the input field * @type {'number' | 'text' | 'password' | 'email' | 'color' | 'integer'} * @optional */ Type?: 'number' | 'text' | 'password' | 'email' | 'color' | 'integer'; /** * CSS styles to apply to the form group * @type {React.CSSProperties} * @optional */ Style?: React.CSSProperties; /** * Flag to allow null values * @type {boolean} * @optional */ AllowNull?: boolean; /** * Size of the input field * @type {'small' | 'large'} * @optional */ Size?: 'small' | 'large'; /** * Default value for the input field if it's null * @type {number} * @optional */ DefaultValue?: number; } export default function Input<T>(props: IProps<T>): JSX.Element; export {};