mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
chore: fix TS error
This commit is contained in:
parent
34d8b83f74
commit
f1a9aa59b2
@ -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,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user