chore: adjust Popover PurePanel style pos

This commit is contained in:
二货机器人 2022-11-03 11:06:34 +08:00
parent d6e643a46d
commit 5cce2cd7c4
2 changed files with 12 additions and 2 deletions

View File

@ -26,7 +26,16 @@ export interface PurePanelProps extends Omit<PopoverProps, 'children'> {
}
export function RawPurePanel(props: any) {
const { hashId, prefixCls, className, placement = 'top', title, content, children } = props;
const {
hashId,
prefixCls,
className,
style,
placement = 'top',
title,
content,
children,
} = props;
return (
<div
@ -37,6 +46,7 @@ export function RawPurePanel(props: any) {
`${prefixCls}-placement-${placement}`,
className,
)}
style={style}
>
<Popup {...props} className={hashId} prefixCls={prefixCls}>
{children || getOverlay(prefixCls, title, content)}

View File

@ -38,7 +38,7 @@ export default function PurePanel(props: PurePanelProps) {
<PopoverRawPurePanel
prefixCls={prefixCls}
hashId={hashId}
className={classNames(className, `${prefixCls}-pure`, `${prefixCls}-${type}`)}
className={classNames(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`)}
style={style}
>
{node}