mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 15:09:51 +00:00
20 lines
542 B
JavaScript
20 lines
542 B
JavaScript
import Link from 'next/link'
|
|
|
|
export default function CategoryItem({ selected, category, categoryCount }) {
|
|
return (
|
|
<Link
|
|
href={`/category/${category}`}
|
|
passHref
|
|
className={
|
|
(selected
|
|
? 'bg-gray-600 text-white '
|
|
: 'dark:text-gray-400 text-gray-900 ') +
|
|
'text-sm font-semibold hover:underline flex text-md items-center duration-300 cursor-pointer py-1 whitespace-nowrap'
|
|
}>
|
|
<div>
|
|
{category} {categoryCount && `(${categoryCount})`}
|
|
</div>
|
|
</Link>
|
|
)
|
|
}
|