
interface Props {
    tab: string;
    active: string;
    setActive: (tab: string) => void;
}


export default function TabButton({
    tab,
    active,
    setActive
}: Props) {
    return (
        <button
            key={tab}
            onClick={() => setActive(tab)}
            className={`px-5 py-3.5 text-sm font-medium transition-all duration-150 border-b-2 -mb-px whitespace-nowrap ${active === tab
                ? 'border-[#b8903a] text-[#b8903a]'
                : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'
                }`}
        >
            {tab}
        </button>
    )
}