import { useIntl } from '@umijs/max'; import { Button, Space } from 'antd'; import React from 'react'; import styled from 'styled-components'; type ModalFooterProps = { onOk?: () => void; onCancel?: () => void; cancelText?: string; okText?: string; htmlType?: 'button' | 'submit'; okBtnProps?: any; cancelBtnProps?: any; loading?: boolean; style?: React.CSSProperties; showOkBtn?: boolean; showCancelBtn?: boolean; extra?: React.ReactNode; form?: any; description?: React.ReactNode; }; const Wrapper = styled.div` display: flex; justify-content: space-between; align-items: center; gap: 20px; `; const ModalFooter: React.FC = ({ onOk, onCancel, cancelText, okText, okBtnProps, cancelBtnProps, loading, htmlType = 'button', style, showOkBtn = true, description, extra, showCancelBtn = true, form }) => { const intl = useIntl(); return (
{description}
{showCancelBtn && ( )} {extra} {showOkBtn && ( )}
); }; export default ModalFooter;