refactor: 更新配置模块的样式与布局,优化组件结构,增强可读性与一致性
This commit is contained in:
@@ -13,7 +13,10 @@ export function ConfigSubNav() {
|
||||
const links = CONFIG_NAV_GROUPS.flatMap((group) => group.items);
|
||||
|
||||
return (
|
||||
<nav className="flex w-full flex-wrap items-end gap-1 border-b border-border/60 px-1" aria-label={t("nav.aria")}>
|
||||
<nav
|
||||
className="flex w-full flex-wrap gap-1 rounded-xl border border-border/60 bg-muted/40 p-1.5"
|
||||
aria-label={t("nav.aria")}
|
||||
>
|
||||
{links.map(({ href, key }) => {
|
||||
const active = pathname === href || pathname.startsWith(`${href}/`);
|
||||
return (
|
||||
@@ -21,10 +24,10 @@ export function ConfigSubNav() {
|
||||
key={href}
|
||||
href={href}
|
||||
className={cn(
|
||||
"border-b-2 px-4 py-3 text-sm font-medium transition-colors",
|
||||
"rounded-lg px-4 py-2.5 text-sm font-medium transition-colors",
|
||||
active
|
||||
? "border-primary text-primary"
|
||||
: "border-transparent text-muted-foreground hover:border-border/80 hover:text-foreground",
|
||||
? "bg-card text-primary shadow-sm"
|
||||
: "text-muted-foreground hover:bg-card/60 hover:text-foreground",
|
||||
)}
|
||||
>
|
||||
{t(`nav.items.${key}`)}
|
||||
|
||||
Reference in New Issue
Block a user