mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 05:33:14 +00:00
23 lines
468 B
TypeScript
23 lines
468 B
TypeScript
import { cn } from "@/lib/utils";
|
|
|
|
export type CountBadgeProps = {
|
|
count: number;
|
|
className?: string;
|
|
};
|
|
|
|
export function CountBadge({ count, className }: CountBadgeProps) {
|
|
if (count <= 0) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<span
|
|
className={cn(
|
|
"inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-primary px-1.5 text-[10.5px] font-bold text-white",
|
|
className,
|
|
)}
|
|
>
|
|
{count}
|
|
</span>
|
|
);
|
|
}
|