interface ButtonProps {
  text: string;
  icon?: React.ReactNode;
  iconOrderLast?: boolean;
  widthFull?: boolean;
  onClick?: () => void;
}
function Button({
  text,
  icon,
  iconOrderLast,
  widthFull,
  onClick,
}: ButtonProps) {
  return (
    <button
      className={`py-2.5 bg-[#0079C2] rounded-full flex gap-2 items-center justify-center outline-none pl-[22px] pr-[30px] w-fit ${
        widthFull ? "w-full" : "w-fit"
      }`}
      onClick={onClick}
    >
      <span
        className={`${iconOrderLast ? "order-last" : ""} ${
          widthFull ? "" : ""
        }`}
      >
        {icon}
      </span>
      <span>{text}</span>
    </button>
  );
}

export default Button;
