mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-23 17:55:46 +08:00
feat: app sidebar support collapse (#1997)
This commit is contained in:
@@ -18,7 +18,7 @@ export type NavLinkProps = {
|
||||
selected: NavIcon
|
||||
normal: NavIcon
|
||||
}
|
||||
mode?: 'expand' | 'collapse'
|
||||
mode?: string
|
||||
}
|
||||
|
||||
export default function NavLink({
|
||||
@@ -45,13 +45,15 @@ export default function NavLink({
|
||||
href={href}
|
||||
className={classNames(
|
||||
isActive ? 'bg-primary-50 text-primary-600 font-semibold' : 'text-gray-700 hover:bg-gray-100 hover:text-gray-700',
|
||||
'group flex items-center rounded-md px-2 py-2 text-sm font-normal',
|
||||
'group flex items-center h-9 rounded-md py-2 text-sm font-normal',
|
||||
mode === 'expand' ? 'px-3' : 'px-2.5',
|
||||
)}
|
||||
>
|
||||
<NavIcon
|
||||
className={classNames(
|
||||
'mr-2 h-4 w-4 flex-shrink-0',
|
||||
'h-4 w-4 flex-shrink-0',
|
||||
isActive ? 'text-primary-600' : 'text-gray-700',
|
||||
mode === 'expand' ? 'mr-2' : 'mr-0',
|
||||
)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user