import { useIntl } from '@umijs/max'; import { Button, Space } from 'antd'; type FormButtonsProps = { onOk?: () => void; onCancel?: () => void; cancelText?: string; okText?: string; showOk?: boolean; showCancel?: boolean; htmlType?: 'submit' | 'button'; }; const FormButtons: React.FC = ({ onOk, onCancel, cancelText, okText, showCancel = true, showOk = true, htmlType = 'button' }) => { const intl = useIntl(); return ( {showOk && ( )} {showCancel && ( )} ); }; export default FormButtons;