perf(style): codex-skills/cowa-admin-list-ui

This commit is contained in:
zhangheng
2026-04-28 14:36:36 +08:00
parent 2e33b6fd7e
commit 9d9bf4ff7f
20 changed files with 2672 additions and 812 deletions

View File

@@ -5,6 +5,7 @@ import { NavLink, Space } from "@mantine/core"
import { usePathname, useRouter } from "next/navigation"
import { useState } from "react"
import { MenuItem } from "../common"
import { getShellNavLinkStyles } from "../navStyles"
import { ClientIcon } from "./ClientIcon"
interface LinksGroupProps {
@@ -50,6 +51,10 @@ export function LinksGroup({
))
: null
const isActive = hasLinks
? false
: pathname.startsWith(`/${routerUrl}/${item.url}`)
return (
<>
<NavLink
@@ -63,9 +68,7 @@ export function LinksGroup({
opened={opened}
label={item.title}
noWrap={true}
active={
hasLinks ? false : pathname.startsWith(`/${routerUrl}/${item.url}`)
}
active={isActive}
leftSection={
<>
<Space w={offset} />
@@ -77,7 +80,8 @@ export function LinksGroup({
)}
</>
}
childrenOffset={0}>
childrenOffset={0}
styles={getShellNavLinkStyles(isActive)}>
{children}
</NavLink>
</>