diff --git a/src/components/modal-footer/index.tsx b/src/components/modal-footer/index.tsx index 55ff0301..ae561ad0 100644 --- a/src/components/modal-footer/index.tsx +++ b/src/components/modal-footer/index.tsx @@ -5,7 +5,7 @@ import styled from 'styled-components'; type ModalFooterProps = { onOk?: () => void; - onCancel: () => void; + onCancel?: () => void; cancelText?: string; okText?: string; htmlType?: 'button' | 'submit'; @@ -40,6 +40,7 @@ const ModalFooter: React.FC = ({ showOkBtn = true, description, extra, + showCancelBtn = true, form }) => { const intl = useIntl(); @@ -47,13 +48,15 @@ const ModalFooter: React.FC = ({
{description}
- + {showCancelBtn && ( + + )} {extra} {showOkBtn && (