import TooltipTrigger from "../../structure/TooltipTrigger/index.js";
import styles from './styles.module.scss';
const OptionalTooltip = function OptionalTolltip(props) {
  const {
    tooltip,
    children,
    ...restProps
  } = props;
  if (!tooltip) return children;
  return <TooltipTrigger tooltip={tooltip} className={styles.trigger} tabIndex="-1" {...restProps}>
      {children}
    </TooltipTrigger>;
};
export default OptionalTooltip;