UNPKG

formsy-semantic-ui-react

Version:

Formsy-React wrappers for Semantic-Ui-React's form Components

33 lines (32 loc) 2.23 kB
import { FormsyInjectedProps } from 'formsy-react'; import React, { InputHTMLAttributes } from 'react'; import { StrictFormFieldProps, StrictInputProps } from 'semantic-ui-react'; type SemanticFormField = Pick<StrictFormFieldProps, 'as' | 'className' | 'error' | 'width' | 'inline' | 'disabled'>; type SemanticInputProps = Omit<StrictInputProps, 'error'>; export type IFormsyInputProps<HtmlBaseElement = InputHTMLAttributes<any>, InputValueType = any> = FormsyInjectedProps<InputValueType> & SemanticFormField & SemanticInputProps & Omit<HtmlBaseElement, keyof (SemanticFormField & SemanticInputProps & FormsyInjectedProps<InputValueType>) | 'onBlur' | 'rel' | 'rev' | 'content'> & { id?: string; inputClassName?: string; passRequiredToField?: boolean; inputAs?: React.ReactNode | React.ElementType; errorLabel?: React.ReactElement; label?: string | React.ReactNode; instantValidation?: boolean; defaultValue?: InputValueType; onBlur?(event: React.ChangeEvent<HTMLInputElement>, data: StrictInputProps & { value: InputValueType; }): void; }; declare const _default: React.ComponentType<Omit<import("formsy-react/dist/withFormsy").WrapperProps<any> & import("formsy-react").InjectedProps<any> & SemanticFormField & SemanticInputProps & Omit<React.InputHTMLAttributes<any>, "input" | "type" | "transparent" | "inline" | "error" | "width" | "content" | "loading" | "label" | "focus" | "action" | "rel" | "className" | "children" | "tabIndex" | "disabled" | "size" | "icon" | "onBlur" | "onChange" | "rev" | "as" | "inverted" | "fluid" | "labelPosition" | "actionPosition" | "iconPosition" | keyof import("formsy-react/dist/withFormsy").WrapperProps<InputValueType> | keyof import("formsy-react").InjectedProps<InputValueType>> & { id?: string; inputClassName?: string; passRequiredToField?: boolean; inputAs?: React.ReactNode | React.ElementType; errorLabel?: React.ReactElement; label?: string | React.ReactNode; instantValidation?: boolean; defaultValue?: any; onBlur?(event: React.ChangeEvent<HTMLInputElement>, data: StrictInputProps & { value: any; }): void; }, keyof import("formsy-react").InjectedProps<V>>>; export default _default;