- 统一说明文案层级:Typography.Paragraph 次要文案迁移到 admin-section-description - 状态色补齐边框与中间调令牌,Alert/错误条/Descriptions 与 StatusTag 同源 - 咨询详情描述列表去表格线,改为键值展示并统一令牌 - 新增 BrandMark,侧栏与登录页标识改用品牌首字 - 信任内容改用列表行,空状态、表格骨架屏、主按钮脏检查落地 - design.md 同步令牌映射、切换控件选型与组件清单
26 lines
675 B
TypeScript
26 lines
675 B
TypeScript
import type { ReactNode } from "react";
|
|
|
|
export function EmptyState({
|
|
icon,
|
|
title,
|
|
description,
|
|
action,
|
|
compact = false,
|
|
}: {
|
|
icon?: ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
action?: ReactNode;
|
|
compact?: boolean;
|
|
}) {
|
|
const className = compact ? "admin-empty admin-empty--compact" : "admin-empty";
|
|
return (
|
|
<div className={className}>
|
|
{icon ? <span className="admin-empty__icon">{icon}</span> : null}
|
|
<p className="admin-empty__title">{title}</p>
|
|
{description ? <p className="admin-empty__description">{description}</p> : null}
|
|
{action ? <div className="admin-empty__action">{action}</div> : null}
|
|
</div>
|
|
);
|
|
}
|