refactor(admin): replace inline svgs with icon components and fix icon colors
- replace inline hamburger/close svg with Menu01Icon component in AdminTop - replace inline chevron svg with ChevronRightIcon component for breadcrumbs - add ChevronRightIcon and Menu01Icon imports to AdminTop - fix UserCircle02Icon fill values from hardcoded #ffffff to currentColor
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Fragment, useState, useEffect } from 'react';
|
||||
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react';
|
||||
import { ChevronDownIcon, User03Icon, DashboardSquare03Icon, Logout02Icon } from '@zen/core/shared/icons';
|
||||
import { ChevronDownIcon, ChevronRightIcon, Menu01Icon, User03Icon, DashboardSquare03Icon, Logout02Icon } from '@zen/core/shared/icons';
|
||||
import { UserAvatar } from '@zen/core/shared/components';
|
||||
import { useRouter, usePathname } from 'next/navigation';
|
||||
import { getPage, getPages } from '../registry.js';
|
||||
@@ -87,9 +87,7 @@ const AdminTop = ({ isMobileMenuOpen, setIsMobileMenuOpen, user, onLogout, appNa
|
||||
className="p-1 rounded-md text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors duration-150"
|
||||
aria-label="Toggle menu"
|
||||
>
|
||||
<svg className={`h-5 w-5 transition-transform duration-200 ${isMobileMenuOpen ? 'rotate-90' : ''}`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={isMobileMenuOpen ? "M6 18L18 6M6 6l12 12" : "M4 6h16M4 12h16M4 18h16"} />
|
||||
</svg>
|
||||
<Menu01Icon className="h-5 w-5 transition-transform duration-200" />
|
||||
</button>
|
||||
<h1 className="text-neutral-900 dark:text-white font-semibold text-sm">{appName}</h1>
|
||||
</div>
|
||||
@@ -99,9 +97,7 @@ const AdminTop = ({ isMobileMenuOpen, setIsMobileMenuOpen, user, onLogout, appNa
|
||||
{breadcrumbs.length > 0 && breadcrumbs.map((crumb, i) => (
|
||||
<Fragment key={i}>
|
||||
{i > 0 && (
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="text-neutral-400 dark:text-neutral-600 flex-shrink-0">
|
||||
<polyline points="9 18 15 12 9 6" />
|
||||
</svg>
|
||||
<ChevronRightIcon className="w-3 h-3 text-neutral-400 dark:text-neutral-600 flex-shrink-0" />
|
||||
)}
|
||||
{crumb.icon ? (
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user