UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

19 lines (18 loc) 1.07 kB
import { default as React } from 'react'; import { InputTextProps } from '../../FormInputs/InputText/InputText'; export interface FormFieldTextComponentProps extends Omit<InputTextProps, "onChange" | "id" | "errorId" | "isErrored"> { fieldId: string; value: string; onChange: (value: string) => void; placeholder: string; label: React.ReactNode; showPlaceholderAndHideLabel?: boolean; errorMessage?: React.ReactNode; explanation?: string | JSX.Element; } /** * Generic text field component. * In the JSLIB, a field has a label, inline error message, and an input of some kind. */ export declare const FormFieldText: ({ fieldId, value, onChange, placeholder, label, errorMessage, showPlaceholderAndHideLabel, required, explanation, ...inputTextProps }: FormFieldTextComponentProps) => React.JSX.Element; export declare const FormFieldTextComponent: ({ fieldId, value, onChange, placeholder, label, errorMessage, showPlaceholderAndHideLabel, required, explanation, ...inputTextProps }: FormFieldTextComponentProps) => React.JSX.Element;