magzine 移动端菜单微调

This commit is contained in:
tangly1024.com
2024-09-14 12:28:06 +08:00
parent a0e5c5c2dc
commit 7ddaefef3a
2 changed files with 6 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ export const MenuItemCollapse = props => {
{hasSubMenu && (
<div
onClick={hasSubMenu ? toggleOpenSubMenu : null}
className='py-2 font-extralight flex justify-between cursor-pointer dark:text-gray-200 no-underline tracking-widest'>
className='py-2 flex justify-between cursor-pointer dark:text-gray-200 no-underline tracking-widest'>
<div>
<div className={`${link.icon} text-center w-4 mr-4`} />
{link.name}
@@ -78,7 +78,7 @@ export const MenuItemCollapse = props => {
key={sLink.id}
className='
not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200
font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'>
dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'>
<Link href={sLink.href} target={link?.target}>
<div>
<div

View File

@@ -29,10 +29,8 @@ export const MenuItemDrop = ({ link }) => {
}>
<div className='items-center flex gap-x-1'>
{link?.icon && <i className={link?.icon} />} {link?.name}
{hasSubMenu && (
<i
className={`px-1 fas fa-chevron-down duration-500 transition-all ${show ? ' rotate-180' : ''}`}></i>
)}
<i
className={`px-1 fas fa-chevron-down duration-500 transition-all ${show ? ' rotate-180' : ''}`}></i>
</div>
</div>
)}
@@ -40,7 +38,7 @@ export const MenuItemDrop = ({ link }) => {
{!hasSubMenu && (
<div
className={
'px-3 gap-x-1 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
'px-3 gap-x-1 h-full whitespace-nowrap duration-300 text-md justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
(selected
? 'bg-gray-600 text-white hover:text-white'
: 'hover:text-gray-600')
@@ -59,7 +57,7 @@ export const MenuItemDrop = ({ link }) => {
return (
<li
key={sLink.id}
className='text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-3'>
className='dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-3'>
<Link href={sLink.href} target={link?.target}>
<span className='text-sm hover:underline'>
{link?.icon && <i className={sLink?.icon}> &nbsp; </i>}