From 5ac3f57b7c6f18350d3b6501249f0062e9fc4e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2?= Date: Wed, 8 Nov 2023 11:10:35 +0800 Subject: [PATCH] feat(modal): PureRender support custom footer callback (#44985) * demo: update debug demo * chore: improve typo * Revert "chore: improve typo" This reverts commit d5163f98ececa6266d34d68d9d4bc9f83cf06095. * chore: update * chore: update demo * chore: update snapshots * chore: update --- components/modal/PurePanel.tsx | 7 +- .../__snapshots__/demo-extend.test.ts.snap | 158 ++++++++++++++++++ .../__snapshots__/demo.test.tsx.snap | 158 ++++++++++++++++++ components/modal/demo/render-panel.tsx | 28 +++- 4 files changed, 347 insertions(+), 4 deletions(-) diff --git a/components/modal/PurePanel.tsx b/components/modal/PurePanel.tsx index 66ee59fcf2..7abde56479 100644 --- a/components/modal/PurePanel.tsx +++ b/components/modal/PurePanel.tsx @@ -13,8 +13,8 @@ import { Footer, renderCloseIcon } from './shared'; import useStyle from './style'; export interface PurePanelProps - extends Omit, - Pick { + extends Omit, + Pick { prefixCls?: string; style?: React.CSSProperties; } @@ -28,6 +28,7 @@ const PurePanel: React.FC = (props) => { type, title, children, + footer, ...restProps } = props; const { getPrefixCls } = React.useContext(ConfigContext); @@ -60,7 +61,7 @@ const PurePanel: React.FC = (props) => { additionalProps = { closable: closable ?? true, title, - footer: props.footer === undefined ?