fix: console warning

This commit is contained in:
alt0
2022-10-10 18:24:15 +08:00
parent ab78245eb4
commit 09dea80a08
2 changed files with 12 additions and 7 deletions
+7 -5
View File
@@ -32,11 +32,13 @@ export const TransitionsModal = (props: TransitionsModalProps) => {
onClose={props.onClose}
closeAfterTransition
>
<MuiClickAwayListener onClickAway={props.onClose}>
<Fade in={props.open} timeout={300}>
{props.children}
</Fade>
</MuiClickAwayListener>
<div>
<MuiClickAwayListener onClickAway={props.onClose}>
<Fade in={props.open} timeout={300}>
{props.children}
</Fade>
</MuiClickAwayListener>
</div>
</Modal>
);
};
+5 -2
View File
@@ -25,8 +25,11 @@ export const placementToContainerDirection: Record<
'auto-end': 'none',
};
export const Popover = (props: PropsWithChildren<PopoverProps>) => {
const { popoverDirection, placement, content, children, style } = props;
export const Popover = ({
popoverDirection,
...props
}: PropsWithChildren<PopoverProps>) => {
const { placement, content, children, style } = props;
return (
<Popper
{...props}