UNPKG

@gpa-gemstone/react-forms

Version:
50 lines (49 loc) 1.54 kB
import * as React from 'react'; import { Gemstone } from '@gpa-gemstone/application-typings'; interface IProps<T> extends Omit<Gemstone.TSX.Interfaces.IBaseFormProps<T>, 'Valid' | 'Feedback'> { /** * 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 Input component * @type {React.CSSProperties} * @optional */ Style?: React.CSSProperties; /** * Default value to use when adding an item and when value is null * @type {number} */ DefaultValue: number | string; /** * Flag to allow null values * @type {boolean} * @optional */ AllowNull?: boolean; /** * Function to determine the validity of a field * @param field - Field of the record to check * @returns {boolean} */ ItemValid?: (value: string | number, index: number, arr: Array<string | number>) => boolean; /** * Feedback message to show when input is invalid * @type {string} * @optional */ ItemFeedback?: (value: string | number, index: number, arr: Array<string | number>) => string | undefined; /** * Flag to disable add button */ DisableAdd?: boolean; /** * Flag to disable all input fields */ Disabled?: boolean; } declare function MultiInput<T>(props: IProps<T>): JSX.Element; export default MultiInput;