import React from "react";
import { FaPlus } from "react-icons/fa";

interface OptionalAddButtonProps {
  onClick: () => void;
  size?: number;
  className?: string;
}

export const OptionalAddButton: React.FC<OptionalAddButtonProps> = ({
  onClick,
  size = 14,
  className = "",
}) => {
  return (
    <button
      type="button"
      title="Adicionar novo fabricante"
      aria-label="Adicionar novo fabricante"
      onClick={onClick}
      className={`
        ml-0.5
        w-7 h-7
        flex items-center justify-center
        rounded-md
        border border-primary/25
        text-primary
        bg-primary/5
        transition
        hover:bg-primary/10
        hover:border-primary/40
        focus:outline-none
        ${className}
      `}
    >
      <FaPlus size={size} />
    </button>
  );
};
