1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

filter out className from Tippy (#1783)

This commit is contained in:
Matthias Kretschmann 2022-11-09 12:23:26 +00:00 committed by GitHub
parent 482af1be0c
commit b99634a3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}
>
<div className={styleClasses}>{children || <DefaultTrigger />}</div>
</Tippy>