madiator.com/ui/component/common/tooltip.jsx

19 lines
374 B
React
Raw Permalink Normal View History

2021-08-16 12:11:25 +02:00
// @flow
import type { Node } from 'react';
import React from 'react';
import ReachTooltip from '@reach/tooltip';
import '@reach/tooltip/styles.css';
type Props = {
label: string | Node,
children: Node,
};
function Tooltip(props: Props) {
const { children, label } = props;
return <ReachTooltip label={label}>{children}</ReachTooltip>;
}
export default Tooltip;