mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useState } from 'react'
|
||||
|
||||
export const MenuItemDrop = ({ link }) => {
|
||||
@@ -15,12 +15,12 @@ export const MenuItemDrop = ({ link }) => {
|
||||
onMouseOut={() => changeShow(false)}>
|
||||
{/* 不含子菜单 */}
|
||||
{!hasSubMenu && (
|
||||
<Link
|
||||
<SmartLink
|
||||
target={link?.target}
|
||||
href={link?.href}
|
||||
className=' hover:bg-black hover:bg-opacity-10 rounded-2xl flex justify-center items-center px-3 py-1 no-underline tracking-widest'>
|
||||
{link?.icon && <i className={link?.icon} />} {link?.name}
|
||||
</Link>
|
||||
</SmartLink>
|
||||
)}
|
||||
{/* 含子菜单的按钮 */}
|
||||
{hasSubMenu && (
|
||||
@@ -44,12 +44,12 @@ export const MenuItemDrop = ({ link }) => {
|
||||
<li
|
||||
key={index}
|
||||
className='cursor-pointer hover:bg-blue-600 dark:hover:bg-yellow-600 hover:text-white text-gray-900 dark:text-gray-100 tracking-widest transition-all duration-200 py-1 pr-6 pl-3'>
|
||||
<Link href={sLink.href} target={link?.target}>
|
||||
<SmartLink href={sLink.href} target={link?.target}>
|
||||
<span className='text-sm text-nowrap font-extralight'>
|
||||
{link?.icon && <i className={sLink?.icon}> </i>}
|
||||
{sLink.title}
|
||||
</span>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user