Spaces:
Sleeping
Sleeping
File size: 555 Bytes
e85fa50 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import React from 'react';
import { Category } from '../../types';
interface CategoryBadgeProps {
category: Category;
onClick?: () => void;
className?: string;
}
const CategoryBadge: React.FC<CategoryBadgeProps> = ({
category,
onClick,
className = ''
}) => {
return (
<div
className={`ios-tag cursor-pointer ${className}`}
style={{ backgroundColor: `${category.color}20`, color: category.color }}
onClick={onClick}
>
{category.name}
</div>
);
};
export default CategoryBadge; |