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} onClose={props.onClose}
closeAfterTransition closeAfterTransition
> >
<MuiClickAwayListener onClickAway={props.onClose}> <div>
<Fade in={props.open} timeout={300}> <MuiClickAwayListener onClickAway={props.onClose}>
{props.children} <Fade in={props.open} timeout={300}>
</Fade> {props.children}
</MuiClickAwayListener> </Fade>
</MuiClickAwayListener>
</div>
</Modal> </Modal>
); );
}; };
+5 -2
View File
@@ -25,8 +25,11 @@ export const placementToContainerDirection: Record<
'auto-end': 'none', 'auto-end': 'none',
}; };
export const Popover = (props: PropsWithChildren<PopoverProps>) => { export const Popover = ({
const { popoverDirection, placement, content, children, style } = props; popoverDirection,
...props
}: PropsWithChildren<PopoverProps>) => {
const { placement, content, children, style } = props;
return ( return (
<Popper <Popper
{...props} {...props}