From 2b5034cab386a7737a1a0f9908c57b9b3ee56c7e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 12:51:39 +0000 Subject: [PATCH] feat(ui): survey/NudgePrompt to shadcn Button - antd Button (primary + outlined-danger) \u2192 shadcn Button default + destructive-tinted outline variants. - Inline gray palette replaced with semantic bg-background/border- border/text-muted-foreground tokens. - Confirmation state's emerald check-mark tile uses categorical palette (existing overrides cover this). Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../src/components/survey/NudgePrompt.tsx | 66 +++++++++++-------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/ui/litellm-dashboard/src/components/survey/NudgePrompt.tsx b/ui/litellm-dashboard/src/components/survey/NudgePrompt.tsx index 3c7f10af74c..5766d190e1b 100644 --- a/ui/litellm-dashboard/src/components/survey/NudgePrompt.tsx +++ b/ui/litellm-dashboard/src/components/survey/NudgePrompt.tsx @@ -1,8 +1,12 @@ import React, { useEffect, useState } from "react"; import { X, LucideIcon, Check } from "lucide-react"; -import { Button } from "antd"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; import { useDisableShowPrompts } from "@/app/(dashboard)/hooks/useDisableShowPrompts"; -import { setLocalStorageItem, emitLocalStorageChange } from "@/utils/localStorageUtils"; +import { + setLocalStorageItem, + emitLocalStorageChange, +} from "@/utils/localStorageUtils"; interface NudgePromptProps { onOpen: () => void; @@ -16,8 +20,8 @@ interface NudgePromptProps { buttonStyle?: React.CSSProperties; } -const DISMISS_DURATION = 15000; // 15 seconds -const CONFIRMATION_DURATION = 5000; // 5 seconds +const DISMISS_DURATION = 15000; +const CONFIRMATION_DURATION = 5000; export function NudgePrompt({ onOpen, @@ -44,7 +48,10 @@ export function NudgePrompt({ const startTime = Date.now(); const interval = setInterval(() => { const elapsed = Date.now() - startTime; - const remaining = Math.max(0, 100 - (elapsed / DISMISS_DURATION) * 100); + const remaining = Math.max( + 0, + 100 - (elapsed / DISMISS_DURATION) * 100, + ); setProgress(remaining); if (remaining <= 0) { @@ -72,21 +79,25 @@ export function NudgePrompt({ setShowConfirmation(true); }; - // Show confirmation even if disableShowPrompts is true (since we just set it) if (showConfirmation) { return (
-
- +
+
-

- Got it, we will not ask again. Reactivate this at any time in the User Menu. +

+ Got it, we will not ask again. Reactivate this at any time in + the User Menu.

@@ -95,16 +106,18 @@ export function NudgePrompt({ ); } - // Don't show the prompt if disabled (unless we're showing confirmation) if (!isVisible || disableShowPrompts) return null; return (
- {/* Progress bar at top showing time remaining */} -
+
-
+
{title}
-

{description}

+

{description}

- @@ -145,4 +160,3 @@ export function NudgePrompt({
); } -