import { Tag } from "antd";

export function CoursesSectionTag({category, selectedCategory, setSelectedCategory}) {
    return (
        <>
            <Tag
                key={category}
                color={
                    selectedCategory === category
                        ? "blue"
                        : "default"
                }
                onClick={() => {
                    setSelectedCategory(category);
                }}
                className={`px-6 py-2 text-base cursor-pointer rounded-full transition-all duration-300 ${selectedCategory === category
                        ? "bg-blue-600 text-white shadow-lg"
                        : "bg-white text-gray-600 hover:bg-gray-100"
                    }`}>
                {category}
            </Tag>
        </>
    )
}
