From 526fbbd03ad26a2880002f8b616727e356a5d231 Mon Sep 17 00:00:00 2001 From: Willie Date: Fri, 10 Apr 2026 17:55:19 +0800 Subject: [PATCH] fix(ui): add missing 'warning' variant to Button component UpdatePage uses variant="warning" on the Force Retry button for blocked items to visually distinguish them from error-state Force Retry (which uses danger). The Button component didn't expose a warning variant, causing the Docker build to fail with a TS2322 type error. Adds warning alongside existing danger variant, mirroring the same outlined-with-hover-fill pattern and matching the warning color scheme already used by Badge and in-line text-warning classes. --- ui/src/components/Button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/components/Button.tsx b/ui/src/components/Button.tsx index f343d8780..4427f0148 100644 --- a/ui/src/components/Button.tsx +++ b/ui/src/components/Button.tsx @@ -3,7 +3,7 @@ import Spinner from './Spinner'; interface ButtonProps extends ButtonHTMLAttributes { children: ReactNode; - variant?: 'primary' | 'secondary' | 'danger' | 'ghost' | 'link'; + variant?: 'primary' | 'secondary' | 'danger' | 'warning' | 'ghost' | 'link'; size?: 'xs' | 'sm' | 'md' | 'lg'; loading?: boolean; ref?: Ref; @@ -13,6 +13,7 @@ const variantClasses = { primary: 'bg-pencil text-paper border-2 border-pencil hover:bg-pencil/85', secondary: 'bg-transparent text-pencil border-2 border-muted-dark hover:bg-muted/30 hover:border-pencil hover:shadow-sm', danger: 'bg-transparent text-danger border-2 border-danger hover:bg-danger hover:text-white', + warning: 'bg-transparent text-warning border-2 border-warning hover:bg-warning hover:text-white', ghost: 'bg-transparent text-pencil-light hover:text-pencil hover:bg-muted/30', link: 'bg-transparent text-pencil-light hover:text-pencil hover:underline border-none', };