chore:platform文件拆分

This commit is contained in:
xiaozhu
2026-08-04 18:46:18 +08:00
parent 87382d7bda
commit 4e95399d4f
17 changed files with 2701 additions and 793 deletions
+23
View File
@@ -0,0 +1,23 @@
import Icon from "./Icon";
type ToastState = {
tone: "success" | "error" | "info";
message: string;
};
type ToastProps = {
toast: ToastState | null;
};
export function Toast({ toast }: ToastProps) {
if (!toast) return null;
return (
<div className={`toast toast--${toast.tone}`} role="status">
<span>
<Icon name={toast.tone === "success" ? "check" : "info"} size={17} />
</span>
{toast.message}
</div>
);
}