mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
排版微调
This commit is contained in:
@@ -5,16 +5,19 @@ import React from 'react'
|
||||
|
||||
const CategoryGroup = ({ currentCategory, categories }) => {
|
||||
return <div>
|
||||
<div id='category-list' className='dark:border-gray-600 dark:bg-gray-900'>
|
||||
{Object.keys(categories).map(category => {
|
||||
const selected = currentCategory === category
|
||||
return <Link key={category} href={`/category/${category}`} passHref>
|
||||
<div className={(selected ? 'bg-gray-200 dark:bg-black dark:text-white text-black ' : 'dark:text-gray-400 text-gray-500 ') + ' hover:text-black dark:hover:text-white dark:hover:bg-gray-600 px-5 cursor-pointer py-2 hover:bg-gray-100'}>
|
||||
<FontAwesomeIcon icon={selected ? faFolderOpen : faFolder} className={`${selected ? 'text-black dark:text-white' : 'text-gray-400'} mr-2 `}/>{category}({categories[category]})</div>
|
||||
</Link>
|
||||
})}
|
||||
</div>
|
||||
<div id='category-list' className='dark:border-gray-600 dark:bg-gray-900'>
|
||||
{Object.keys(categories).map(category => {
|
||||
const selected = currentCategory === category
|
||||
return <Link key={category} href={`/category/${category}`} passHref>
|
||||
<div className={(selected
|
||||
? 'bg-gray-200 dark:bg-black text-black dark:text-white'
|
||||
: 'dark:text-gray-400 text-gray-500') +
|
||||
' duration-300 hover:text-black dark:hover:text-white hover:underline px-5 cursor-pointer py-2'}>
|
||||
<FontAwesomeIcon icon={selected ? faFolderOpen : faFolder} className={`${selected ? 'text-black dark:text-white' : 'text-gray-400'} mr-2 `} />{category}({categories[category]})</div>
|
||||
</Link>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
export default CategoryGroup
|
||||
|
||||
Reference in New Issue
Block a user