import { ReactNode } from 'react'; import * as RadixTooltip from '@radix-ui/react-tooltip'; import { useTheme } from 'styled-components'; import { Content } from './styles'; type TooltipProps = { children: ReactNode; content: string | undefined; side?: 'top' | 'right' | 'bottom' | 'left'; align?: 'start' | 'center' | 'end'; }; export function Tooltip({ children, content, side = 'top', align = 'center', }: TooltipProps): JSX.Element { const theme = useTheme(); return ( {children} {!!content && (

{content}

)}
); }