feat: antd 主题改造 — 启用 cssVar、纯黑白 colorPrimary、统一 sidebar/滚动条/按钮样式
This commit is contained in:
@@ -18,7 +18,7 @@ const STATUS_MAP: Record<MaterialStatus, { color: string; label: string }> = {
|
||||
|
||||
export function MaterialCard({ material, onDelete, onSelect, selected }: MaterialCardProps) {
|
||||
const statusInfo = STATUS_MAP[material.status];
|
||||
const className = selected ? "material-list-item material-list-item--selected" : "material-list-item";
|
||||
const className = selected ? "app-sidebar-list-item app-sidebar-list-item--selected" : "app-sidebar-list-item";
|
||||
|
||||
return (
|
||||
<Flex align="center" className={className} gap="small" justify="space-between" onClick={onSelect}>
|
||||
|
||||
@@ -13,7 +13,6 @@ import { useMemo, useState } from "react";
|
||||
import type { Material } from "../types";
|
||||
|
||||
import { SidebarGroup } from "../../../shared/components/SidebarGroup";
|
||||
import { useIsDark } from "../../../shared/hooks/use-is-dark";
|
||||
import { GROUP_LABELS, groupByDate } from "../../../shared/utils/date-group";
|
||||
import { MaterialCard } from "./MaterialCard";
|
||||
|
||||
@@ -37,7 +36,6 @@ type FilterValue = (typeof STATUS_FILTER_OPTIONS)[number]["value"];
|
||||
|
||||
export function MaterialList({ loading, materials, onAddClick, onDelete, onSelect, selectedId }: MaterialListProps) {
|
||||
const [filterStatus, setFilterStatus] = useState<FilterValue>("all");
|
||||
const isDark = useIsDark();
|
||||
|
||||
const filteredMaterials = useMemo(() => {
|
||||
if (filterStatus === "all") return materials;
|
||||
@@ -74,7 +72,7 @@ export function MaterialList({ loading, materials, onAddClick, onDelete, onSelec
|
||||
overflow: { x: "hidden", y: "scroll" },
|
||||
scrollbars: {
|
||||
autoHide: "move",
|
||||
theme: isDark ? "os-theme-custom-dark" : "os-theme-custom",
|
||||
theme: "os-theme-custom",
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user