import { classNames } from '@/lib/components/classNames';
import type { ReactNode } from 'react';
import styles from './Tooltip.module.css';

export function Tooltip({
  content,
  children,
  className,
}: {
  content: string;
  children: ReactNode;
  className?: string;
}) {
  return (
    <span className={classNames(styles.root, className)}>
      {children}
      <span role="tooltip" className={styles.tooltip}>
        {content}
      </span>
    </span>
  );
}
