import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import "./Green_Btn_With_Icon.css";

const Green_Btn_With_Icon = (props) => {
  return (
    <button
      className="Green_Btn_With_Icon"
      onClick={props?.onClick}
      type={props.type || "button"}
    >
      <p className="btn_text">{props?.btnText}</p>
      {props?.leftIcon && (
        <div className="icon_holder">
          <FontAwesomeIcon icon={props?.leftIcon} className="left_icon" />
        </div>
      )}
      {props?.viewIcon && (
        <div className="icon_holder view-icon">
          <FontAwesomeIcon icon={props?.viewIcon} className="left_icon" />
        </div>
      )}
      {props?.rightIcon && (
        <div className="icon_holder">
          <FontAwesomeIcon icon={props?.rightIcon} className="right_icon" />
        </div>
      )}
    </button>
  );
};

export default Green_Btn_With_Icon;
