mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
V2.0 重新排班
This commit is contained in:
@@ -4,21 +4,21 @@ import Link from 'next/link'
|
||||
import React from 'react'
|
||||
|
||||
const CategoryGroup = ({ currentCategory, categories }) => {
|
||||
return <div className='mt-3'>
|
||||
<div id='category-list' className='dark:border-gray-600 dark:bg-gray-900 flex flex-wrap'>
|
||||
return <>
|
||||
<div id='category-list' className='dark:border-gray-600 dark:bg-gray-800 flex flex-wrap'>
|
||||
{Object.keys(categories).map(category => {
|
||||
const selected = currentCategory === category
|
||||
return <Link key={category} href={`/category/${category}`} passHref>
|
||||
<a className={(selected
|
||||
? 'bg-gray-200 dark:bg-black text-black dark:text-white'
|
||||
: 'dark:text-gray-400 text-gray-500') +
|
||||
' duration-300 hover:text-blue-500 dark:hover:text-blue-400 hover:underline px-5 cursor-pointer pt-2 font-light'}>
|
||||
<FontAwesomeIcon icon={selected ? faFolderOpen : faFolder} className={`${selected ? 'text-black dark:text-white' : 'text-gray-400'} mr-2`} />{category}({categories[category]})
|
||||
? 'hover:text-white bg-blue-500 dark:bg-black text-white '
|
||||
: 'dark:text-gray-400 text-gray-500 hover:text-blue-500 ') +
|
||||
' text-sm w-full items-center duration-300 dark:hover:text-blue-400 hover:underline px-5 cursor-pointer py-1 font-light'}>
|
||||
<FontAwesomeIcon icon={selected ? faFolderOpen : faFolder} className={`${selected ? 'text-white' : 'text-gray-400'} mr-2`} />{category}({categories[category]})
|
||||
</a>
|
||||
</Link>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
|
||||
export default CategoryGroup
|
||||
|
||||
Reference in New Issue
Block a user