import React, { ReactNode } from "react";
import Icon from "../icon/icon";

interface ISelectHeader {
  icon: string;
  text: ReactNode;
}

const SelectIconHeader: React.FC<ISelectHeader> = props => {
  const { icon, text } = props;

  return (
    <div className="text-truncate">
      <div className="d-flex justify-content-start">
        <Icon className="mr-3" id={icon} size="sm" />
        {text}
      </div>
    </div>
  );
};

SelectIconHeader.displayName = "SelectIconHeader";

export default SelectIconHeader;
