({ categories, selectedCategory, handleCategoryChange }: CategoryProps)
| 76 | }; |
| 77 | |
| 78 | const ButtonCategory = ({ categories, selectedCategory, handleCategoryChange }: CategoryProps) => { |
| 79 | return ( |
| 80 | <div className="flex justify-evenly mx-auto border-2 rounded-full py-1 w-2/3"> |
| 81 | <Button variant="ghost" className="rounded-full" onClick={() => handleCategoryChange("All")}> |
| 82 | All |
| 83 | </Button> |
| 84 | {categories.map((category) => ( |
| 85 | <Button |
| 86 | key={category.category} |
| 87 | variant="ghost" |
| 88 | onClick={() => handleCategoryChange(category.category)} |
| 89 | className={ |
| 90 | selectedCategory === category.category ? "bg-gray-300 dark:bg-slate-700 rounded-full" : "rounded-full" |
| 91 | } |
| 92 | > |
| 93 | {category.category} |
| 94 | </Button> |
| 95 | ))} |
| 96 | </div> |
| 97 | ); |
| 98 | }; |
nothing calls this directly
no test coverage detected