Skip to content
Snippets Groups Projects
Tooltip.tsx 478 B
Newer Older
insert's avatar
insert committed
import { Children } from "../../types/Preact";
import Tippy, { TippyProps } from '@tippyjs/react';
type Props = Omit<TippyProps, 'children'> & {
insert's avatar
insert committed
    children: Children;
    content: Children;
}

export default function Tooltip(props: Props) {
    const { children, content, ...tippyProps } = props;

insert's avatar
insert committed
    return (
        <Tippy content={content} {...tippyProps}>
            {/*
            // @ts-expect-error */}
            <div>{ children }</div>
        </Tippy>