mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 19:49:19 +08:00
21 lines
875 B
TypeScript
21 lines
875 B
TypeScript
/**
|
|
* 左侧两栏页:列表滚动区容器(灰底托盘,与 Card 白底、列表项卡片分层)
|
|
*/
|
|
export const SIDEBAR_LIST_SHELL_CLASS =
|
|
'flex min-h-0 flex-1 flex-col gap-1.5 overflow-y-auto rounded-lg border border-border bg-slate-100 p-2 dark:border-border dark:bg-slate-900/55';
|
|
|
|
/**
|
|
* 左侧两栏页:列表项选中 / 未选中样式(每项为独立白卡片)
|
|
*/
|
|
export function sidebarListRowClass(active: boolean, extraClasses = '') {
|
|
return [
|
|
'rounded-lg border px-3 py-2.5 text-sm font-semibold transition-all',
|
|
extraClasses,
|
|
active
|
|
? 'border-2 border-primary bg-card text-foreground shadow-md ring-2 ring-primary/30 dark:bg-primary/20 dark:ring-primary/40'
|
|
: 'border-border bg-card text-foreground shadow-sm hover:border-primary/50 hover:shadow-md dark:border-border/80',
|
|
]
|
|
.filter(Boolean)
|
|
.join(' ');
|
|
}
|