diff --git a/src/frontend/client/src/pages/_gallery/GalleryApp.tsx b/src/frontend/client/src/pages/_gallery/GalleryApp.tsx index dce03c0a5..3d35a0a35 100644 --- a/src/frontend/client/src/pages/_gallery/GalleryApp.tsx +++ b/src/frontend/client/src/pages/_gallery/GalleryApp.tsx @@ -77,7 +77,7 @@ export default function GalleryApp() { key={p.id} onClick={() => setActiveId(p.id)} className={cn( - 'flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-body-sm transition-colors', + 'flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-body transition-colors', activeId === p.id ? 'bg-blue-500/[0.08] font-medium text-text-primary' : 'text-muted-foreground hover:bg-muted/60', diff --git a/src/frontend/client/src/pages/_gallery/components/kit.tsx b/src/frontend/client/src/pages/_gallery/components/kit.tsx index db113c73b..4c4e4e6d1 100644 --- a/src/frontend/client/src/pages/_gallery/components/kit.tsx +++ b/src/frontend/client/src/pages/_gallery/components/kit.tsx @@ -49,7 +49,7 @@ export function ComponentPage({
OGDialogTemplate selection(剩 13 文件:7 处死 UI 确认 + 6 处表单弹窗),新页面走{' '}
@@ -116,9 +116,14 @@ export function ConfirmDialogSection() {
(另有 9 个文件手拼 AlertDialog —— 属于普通弹窗,归 Modal 改造范围,本期不动。)
>
}
+ whenToUse={[
+ <>危险操作(删除等)用 useConfirm():variant: destructive(红)/ default(橙色警示)。>,
+ <>确认按钮只两档:danger #f53f3f / primary 主色(selectVariant 指定);特例走 selectClasses 口子。>,
+ <>壳:圆角 16 / p-5 / 灰底毛玻璃;取消按钮白底描边。B 套已对齐 C 套基准。>,
+ ]}
>
- {/* The three coexisting confirm-dialog systems */}
- +
这里是弹窗正文示例。观察内边距、行距与正文和标题/按钮的间距。
@@ -68,22 +68,24 @@ function ConfirmReferenceDemo() { export function ModalSection() { return ( -