import React from 'react'; import { Manager, Reference, Popper } from 'react-popper'; import { TargetWrapper, TooltipContainer, Arrow } from './styled'; import Portal from '../Portal'; type Props = { anchor?: 'left' | 'right' | 'top' | 'bottom'; children: React.ReactNode; content: React.ReactNode; }; const Tooltip: React.FC = ({ anchor = 'left', children, content, }: Props) => ( {({ ref }): React.ReactElement => ( {children} )} {({ ref, style, placement, arrowProps }): React.ReactElement => ( {content} )} ); export default Tooltip;