主要菜单加入图标
This commit is contained in:
tangly1024
2021-12-02 10:54:00 +08:00
parent f7dbd26b70
commit 2a105d71f3
8 changed files with 29 additions and 17 deletions

View File

@@ -3,11 +3,11 @@ import Link from 'next/link'
const TagItemMini = ({ tag, selected = false }) => {
return <Link key={tag} href={selected ? '/' : `/tag/${encodeURIComponent(tag.name)}`}>
<div className={`cursor-pointer inline-block rounded hover:bg-gray-500 duration-200
mr-2 my-1 p-1 font-medium font-light text-xs whitespace-nowrap dark:hover:text-white
mr-2 my-1 py-1 px-2 font-medium font-light text-xs whitespace-nowrap dark:hover:text-white
${selected
? 'text-white dark:text-gray-300 bg-black dark:bg-black dark:hover:bg-gray-900'
: `text-gray-600 dark:text-gray-600 hover:shadow-xl hover:text-white dark:hover:bg-gray-600 dark:border-gray-600 notion-${tag.color}_background `}` }>
<div> <i className='fa fa-tag mr-2 py-0.5'/>{tag.name + (tag.count ? `(${tag.count})` : '')} </div>
<div>{tag.name + (tag.count ? `(${tag.count})` : '')} </div>
</div>
</Link>
}