Files
CC-Switch/src/components/ui/sonner.tsx
T
Jason b3e14b3985 style: improve current provider visual feedback and toast duration
- Add light blue ring border to active provider card instead of solid border
- Fix border flashing issue when switching providers
- Reduce toast notification duration from 4s to 2s for better UX
2025-10-30 16:48:07 +08:00

25 lines
780 B
TypeScript

import { Toaster as SonnerToaster } from "sonner";
export function Toaster() {
return (
<SonnerToaster
position="top-center"
richColors
theme="system"
toastOptions={{
duration: 2000,
classNames: {
toast:
"group rounded-md border bg-background text-foreground shadow-lg",
title: "text-sm font-semibold",
description: "text-sm text-muted-foreground",
closeButton:
"absolute right-2 top-2 rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
actionButton:
"rounded-md bg-primary px-3 py-1 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90",
},
}}
/>
);
}