Connect, collaborate, and grow with a community of TypeScript developers
Fixed colors for toast error/success (#934)
Amanuel Odicho86073822ce52
diff --git a/packages/ui/src/components/toast.tsx b/packages/ui/src/components/toast.tsxindex 38b275dc..7a19ef95 100644--- a/packages/ui/src/components/toast.tsx+++ b/packages/ui/src/components/toast.tsx@@ -23,7 +23,7 @@ const ToastViewport = React.forwardRef<ToastViewport.displayName = ToastPrimitives.Viewport.displayName;const toastVariants = cva(- 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',+ 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full text-white',{variants: {variant: {@@ -59,7 +59,7 @@ const ToastAction = React.forwardRef<>(({ className, ...props }, ref) => (<ToastPrimitives.ActionclassName={cn(- 'ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:pointer-events-none disabled:opacity-50',+ 'ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-destructive-foreground group-[.destructive]:dark:hover:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-white bg-transparent px-3 text-sm font-medium transition-colors hover:text-[#27272a] focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:hover:text-[#27272a] dark:hover:border-[#27272a] dark:hover:text-white group-[.destructive]:dark:hover:border-[#27272a] group-[.destructive]:dark:hover:bg-[#27272a]',className,)}ref={ref}