formsy-semantic-ui-react
Version:
Formsy-React wrappers for Semantic-Ui-React's form Components
18 lines (17 loc) • 1.11 kB
TypeScript
import { FormsyInjectedProps } from 'formsy-react';
import React from 'react';
import { Checkbox, Form, Radio, StrictFormFieldProps, StrictRadioProps } from 'semantic-ui-react';
type CheckboxRadioValueType = boolean | number | string;
export interface IFormsyCheckboxProps extends FormsyInjectedProps<CheckboxRadioValueType>, Pick<StrictFormFieldProps, 'as' | 'className' | 'error' | 'width' | 'inline' | 'disabled'>, Omit<StrictRadioProps, 'value' | 'name' | 'onChange'> {
inputClassName?: string;
passRequiredToField?: boolean;
inputAs?: typeof Form.Checkbox | typeof Form.Radio | typeof Checkbox | typeof Radio;
defaultChecked?: boolean;
errorLabel?: React.ReactElement;
label?: string | React.ReactNode;
onChange?(event: React.FormEvent<HTMLInputElement>, data: Omit<StrictRadioProps, 'value'> & {
value: CheckboxRadioValueType;
}): void;
}
declare const _default: React.ComponentType<Omit<IFormsyCheckboxProps & import("formsy-react/dist/withFormsy").WrapperProps<CheckboxRadioValueType>, keyof import("formsy-react").InjectedProps<V>>>;
export default _default;