import { MutableRefObject, default as React } from 'react'; import { InputProps } from '../../'; type DefaultProps = { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string; /** * ID to identify input and corresponding label. */ id: string; /** * The text displayed to identify input text. */ label: string; /** * The error message is displayed when an error occurs. */ error?: string; /** * Component's ref. */ inputRef?: MutableRefObject; /** * Specifies that the whole input component should be disabled. */ disabled?: boolean; }; type ActionableInputField = { actionable?: never; onSubmit?: never; onClear?: never; buttonActionText?: string; displayClearButton?: never; } | { /** * Adds a Button to the component. */ actionable: true; /** * Callback function when button is clicked. Required for actionable input. */ onSubmit: () => void; /** * Callback function when clear button is clicked. Required for actionable input. */ onClear: () => void; /** * The text displayed on the Button. Suggestion: maximum 9 characters. */ buttonActionText?: string; /** * Boolean that controls the clear button. */ displayClearButton?: boolean; }; export type InputFieldProps = DefaultProps & Omit & ActionableInputField; declare const InputField: ({ id, label, type, error, displayClearButton, actionable, buttonActionText, onSubmit, onClear, placeholder, inputRef, disabled, value, testId, ...otherProps }: InputFieldProps) => React.JSX.Element; export default InputField; //# sourceMappingURL=InputField.d.ts.map