From b99634a3b3ad15aba51e73a0cf2c4cb4b852c36e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 9 Nov 2022 12:23:26 +0000 Subject: [PATCH] filter out `className` from `Tippy` (#1783) --- src/components/@shared/atoms/Tooltip/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/@shared/atoms/Tooltip/index.tsx b/src/components/@shared/atoms/Tooltip/index.tsx index 76ee1fe71..7d5e98835 100644 --- a/src/components/@shared/atoms/Tooltip/index.tsx +++ b/src/components/@shared/atoms/Tooltip/index.tsx @@ -17,7 +17,8 @@ const DefaultTrigger = React.forwardRef((props, ref: any) => { }) export default function Tooltip(props: TippyProps): ReactElement { - const { content, children, trigger, disabled, className, placement } = props + const { className, ...restProps } = props + const { content, children, trigger, disabled, placement } = props const [styles, api] = useSpring(() => animation.from) function onMount() { @@ -60,7 +61,7 @@ export default function Tooltip(props: TippyProps): ReactElement { onMount={onMount} onHide={onHide} // animation - {...props} + {...restProps} >
{children || }