Tweak sonner css api

This commit is contained in:
Sam Becker 2023-11-24 23:46:10 -06:00
parent 091c3d217f
commit f552cf4fc7
2 changed files with 9 additions and 7 deletions

View File

@ -103,12 +103,6 @@
p-0 min-h-0
border-none active:bg-transparent shadow-none
}
/* Toasts */
.toaster [data-sonner-toast] {
@apply
font-mono font-normal
!border-gray-200 dark:!border-gray-800
}
/* Common Utilities */
.text-main {
@apply

View File

@ -1,5 +1,6 @@
'use client';
import { cc } from '@/utility/css';
import { useTheme } from 'next-themes';
import { Toaster } from 'sonner';
@ -8,7 +9,14 @@ export default function ToasterWithThemes() {
return (
<Toaster
theme={theme as 'system' | 'light' | 'dark'}
className="toaster"
toastOptions={{
classNames: {
toast: cc(
'font-mono font-normal',
'!border-gray-200 dark:!border-gray-800',
),
},
}}
/>
);
}