@conduction/components
Version:
React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)
15 lines (14 loc) • 571 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import * as styles from "./ToolTip.module.css";
import { Tooltip } from "react-tooltip";
import clsx from "clsx";
/**
* Implement this ToolTip only once, in a high-level wrapper.
* Use the ToolTip anywhere, in any element, by setting the following data props:
*
* data-tooltip-id="this-is-the-id-set-in-ToolTipProps"
* data-tooltip-content="Hello world!"
*/
export const ToolTip = ({ id, layoutClassName }) => {
return _jsx(Tooltip, { className: clsx(styles.tooltip, layoutClassName, layoutClassName), id });
};