mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
13acc5323c
- Change toast position from top-right to top-center for better visibility - Remove success notifications for plugin sync operations to reduce noise - Keep error notifications to alert users of actual issues
24 lines
756 B
TypeScript
24 lines
756 B
TypeScript
import { Toaster as SonnerToaster } from "sonner";
|
|
|
|
export function Toaster() {
|
|
return (
|
|
<SonnerToaster
|
|
position="top-center"
|
|
richColors
|
|
theme="system"
|
|
toastOptions={{
|
|
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",
|
|
},
|
|
}}
|
|
/>
|
|
);
|
|
}
|