From cdad9bda682b28ad7c4b225e2e0d58b56ca20465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Wed, 27 May 2026 13:51:30 +0800 Subject: [PATCH] docs(GlobalSnackbar): clarify relationship with sonner toast Add note explaining when to use GlobalSnackbar (provider context, severity levels, custom positioning) vs sonner toast (simple one-off messages). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- components/GlobalSnackbar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/GlobalSnackbar.tsx b/components/GlobalSnackbar.tsx index f663106..096dee8 100644 --- a/components/GlobalSnackbar.tsx +++ b/components/GlobalSnackbar.tsx @@ -6,6 +6,10 @@ * 2. 通过 useSnackbarState Hook 使用:在组件内部自动管理状态 * 3. 通过 SnackbarProvider 和 useSnackbar Hook 使用:全局单例模式 * + * NOTE: 项目同时使用 sonner 的 toast 进行简单的一次性提示。 + * 本组件适用于需要 severity 级别、Provider 上下文、自定义定位等高级场景。 + * 简单场景(如复制成功、操作提示)优先使用 `import { toast } from 'sonner'`。 + * * @module GlobalSnackbar * @version 1.1.0 *