import { Form, Input } from 'antd' import { NamePath, Rule } from 'rc-field-form/lib/interface' type EditableCellProps = { editing?: boolean dataIndex?: NamePath input?: React.Component isRequired?: boolean title: string formItemClass?: string formItemRules?: Rule[] children: React.ReactNode initialValue: any } export const EditableCell = ({ editing, dataIndex, input, isRequired, title, formItemClass, formItemRules, children, initialValue, }: EditableCellProps) => ( {!editing ? children : ( {input ?? } )} )