import type { ReactNode } from "react"; import { cn } from "./utils/cn.js"; /** * Empty - 空态展示(插画占位 + 文案 + CTA) * * 用途:数据列表为空时展示友好提示,引导用户操作。 * * @example * 新建班级} /> */ export interface EmptyProps { /** 标题(必填) */ title: string; /** 描述文案 */ description?: string; /** 行动按钮(CTA) */ action?: ReactNode; /** 自定义插画;未提供时使用默认占位 */ illustration?: ReactNode; /** 自定义类名 */ className?: string; } export function Empty({ title, description, action, illustration, className, }: EmptyProps): ReactNode { return (
{illustration ?? }

{title}

{description ? (

{description}

) : null}
{action ?? null}
); } function DefaultIllustration(): ReactNode { return ( ); }