import React from "react";
import "./info-badge-styles.scss";
import { InfoBadgeProps } from "@app/models/components";
import Tooltip from "../Tooltip/Tooltip";

const InfoBadge: React.FC<InfoBadgeProps> = ({
  tooltip,
  text,
  icon,
  style,
}) => {
  return (
    <Tooltip {...tooltip}>
      <div className="tag-wrapper" style={style}>
        {text && <p className="tag-text">{text}</p>}
        {icon && <div className="tag-icon">{icon}</div>}
      </div>
    </Tooltip>
  );
};

export default InfoBadge;
