added new file

This commit is contained in:
Jun-te Kim 2026-02-25 12:33:43 +00:00
parent 9923e5ee13
commit b1ce906f2f

View file

@ -0,0 +1,34 @@
"use client"
interface ExpandableCountBarProps<T> {
title: string
items: T[]
onClick?: (items: T[]) => void
className?: string
}
export default function ExpandableCountBar<T>({
title,
items,
onClick,
className = "",
}: ExpandableCountBarProps<T>) {
const count = items.length
return (
<div
onClick={() => onClick?.(items)}
className={`w-full cursor-pointer rounded-xl border bg-white shadow-sm hover:shadow-md transition-all duration-200 p-5 flex justify-between items-center ${className}`}
>
<div className="text-base font-semibold text-gray-800">
{title}
</div>
<div className="flex items-center gap-2 text-sm text-gray-500">
<span>{count} items</span>
<span className="text-xs"></span>
</div>
</div>
)
}