mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 01:08:29 +03:00
16 lines
447 B
TypeScript
16 lines
447 B
TypeScript
import { nanoid } from "nanoid";
|
|
import React from "react";
|
|
import { OverlayTrigger, Tooltip } from "react-bootstrap";
|
|
import { JustChildren } from "types/react";
|
|
|
|
export default function QuickTooltip({
|
|
children,
|
|
tooltipContent,
|
|
}: { tooltipContent: React.ReactChild } & { children: JSX.Element }) {
|
|
return (
|
|
<OverlayTrigger placement="top" overlay={<Tooltip id={nanoid()}>{tooltipContent}</Tooltip>}>
|
|
{children}
|
|
</OverlayTrigger>
|
|
);
|
|
}
|