import type { ReactElement } from 'react'
import styles from './Tooltip.module.css'

interface TooltipProps {
  label: string
  children: ReactElement
}

export function Tooltip({ label, children }: TooltipProps) {
  return (
    <span className={styles.wrap}>
      {children}
      <span className={styles.tip} role="tooltip">
        {label}
      </span>
    </span>
  )
}
