import { StandardProps } from '@smart-link/shared/@material-ui/core'; import * as React from "react"; import { Size } from "../../interfaces"; import { GridColProps, Validator } from "./interface"; import {Control} from '@smart-link/shared/react-hook-form'; export interface WrappedProps { control?: Control; name?: string; rules?: Validator; error?: boolean; disabled?: boolean; value?: T; size?: Size; onChange?: (value: T, ...rest: any[]) => void; } export interface SmartLinkFormItemProps extends StandardProps<{}, SmartLinkFormItemClassKeys> { className?: string; children?: React.ReactNode | ((props: WrappedProps) => React.ReactElement) disabledError?: boolean, defaultControl?: boolean, disabled?: boolean, handleVisible?: [(form: any) => boolean, string | string[]]; label?: string; labelCol?: GridColProps & {style?: React.CSSProperties}; labelWidth?: number; name?: string; required?: boolean; rules?: Validator; style?: React.CSSProperties; spacing?: number; size?: Size; valueMapping?: (e: any) => any wrapCol?: GridColProps & {style?: React.CSSProperties}; } export type SmartLinkFormItemClassKeys = 'root' | 'labelWrapper' | 'labelText' | 'helpText'; export default function SmartLinkFormItem(props: SmartLinkFormItemProps): React.ReactElement