Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

483 B
Raw Blame
import { Toaster as Sonner, ToasterProps } from 'sonner'
import { useTheme } from '@/hooks/useTheme'

const Toaster = ({ ...props }: ToasterProps) => {
  const isDark = useTheme((s) => s.isDark)

  // CSS-var tinting lives in index.css (.toaster); an inline style prop here
  // violates WebView2's hashed style-src CSP and gets dropped.
  return (
    <Sonner
      theme={isDark ? 'dark' : 'light'}
      className="toaster group"
      {...props}
    />
  )
}

export { Toaster }