chore: fix TS error

This commit is contained in:
wuxh 2023-09-18 14:00:43 +08:00
parent 34d8b83f74
commit f1a9aa59b2
No known key found for this signature in database
GPG Key ID: 464F03149513C20C

View File

@ -13,8 +13,8 @@ import { Footer, renderCloseIcon } from './shared';
import useStyle from './style';
export interface PurePanelProps
extends Omit<PanelProps, 'prefixCls'>,
Pick<ModalFuncProps, 'type'> {
extends Omit<PanelProps, 'prefixCls' | 'footer'>,
Pick<ModalFuncProps, 'type' | 'footer'> {
prefixCls?: string;
style?: React.CSSProperties;
}
@ -28,6 +28,7 @@ const PurePanel: React.FC<PurePanelProps> = (props) => {
type,
title,
children,
footer,
...restProps
} = props;
const { getPrefixCls } = React.useContext(ConfigContext);
@ -60,7 +61,7 @@ const PurePanel: React.FC<PurePanelProps> = (props) => {
additionalProps = {
closable: closable ?? true,
title,
footer: props.footer !== null ? <Footer {...(props as any)} /> : props.footer,
footer: footer !== null ? <Footer {...(props as any)} /> : footer,
children,
};
}