mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 04:42:03 +00:00
24 lines
468 B
TypeScript
24 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>
|
||
|
|
);
|
||
|
|
}
|