pleroma/app/soapbox/components/ui/tooltip/tooltip.tsx

24 lines
406 B
TypeScript
Raw Normal View History

2022-03-21 11:09:01 -07:00
import { default as ReachTooltip } from '@reach/tooltip';
import React from 'react';
import './tooltip.css';
interface ITooltip {
/** Text to display in the tooltip. */
2022-03-21 11:09:01 -07:00
text: string,
}
/** Hoverable tooltip element. */
2022-03-21 11:09:01 -07:00
const Tooltip: React.FC<ITooltip> = ({
children,
text,
}) => {
return (
<ReachTooltip label={text}>
{children}
</ReachTooltip>
);
};
export default Tooltip;