lbry-desktop/ui/component/common/tooltip.jsx
2019-11-11 13:27:29 -05:00

21 lines
340 B
JavaScript

// @flow
import type { Node } from 'react';
import React from 'react';
type Props = {
label: string | Node,
children: Node,
};
function Tooltip(props: Props) {
const { children, label } = props;
if (typeof label !== 'string') {
return children;
}
return <span title={label}>{children}</span>;
}
export default Tooltip;