UNPKG

@gpa-gemstone/react-forms

Version:
38 lines (37 loc) 1.08 kB
import { Gemstone } from '@gpa-gemstone/application-typings'; interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> { /** * First field of the record to be edited * @type {keyof T} */ Field1: keyof T; /** * Second field of the record to be edited * @type {keyof T} */ Field2: keyof 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 fields * @type {'number' | 'text' | 'password' | 'email' | 'color'} * @optional */ Type?: 'number' | 'text' | 'password' | 'email' | 'color'; } /** * DoubleInput Component. * A component that renders two input fields, allowing input for two related fields in a single record. */ export default function DoubleInput<T>(props: IProps<T>): JSX.Element; export {};