@arteneo/forge
Version:
21 lines (20 loc) • 1.25 kB
TypeScript
import React from "react";
import { RadioGroupProps, FormControlProps, FormLabelProps, FormControlLabelProps } from "@mui/material";
import { FormikValues } from "formik";
import OptionsType from "../../../components/Form/definitions/OptionsType";
import FieldInterface from "../../../components/Form/definitions/FieldInterface";
interface RadioSpecificProps {
options: OptionsType;
disableTranslateOption?: boolean;
enableClear?: boolean;
clearLabel?: string;
onChange?: (path: string, setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void, event: React.ChangeEvent<HTMLInputElement>, value: string, onChange: () => void, values: FormikValues, name: string) => void;
formLabelProps?: FormLabelProps;
radioGroupProps?: RadioGroupProps;
formControlLabelProps?: FormControlLabelProps;
formControlProps?: FormControlProps;
}
type RadioProps = RadioSpecificProps & FieldInterface;
declare const Radio: ({ options, disableTranslateOption, enableClear, clearLabel, onChange, formLabelProps, radioGroupProps, formControlLabelProps, formControlProps, validate: fieldValidate, ...field }: RadioProps) => React.JSX.Element | null;
export default Radio;
export { RadioProps, RadioSpecificProps };