mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 17:00:27 -04:00
ee8eae7309
This PR moves several components which rely on `next` out of the `ui` package to the `ui-patterns` package. `ui-patterns` package is intented to be imported with specific imports so it's ok if there are components reliant on `next` in there. The `SonnerToaster` component has removed its dependency by requiring a prop for `theme`.
10 lines
243 B
TypeScript
10 lines
243 B
TypeScript
'use client'
|
|
|
|
import { useTheme } from 'next-themes'
|
|
import { SonnerToaster } from 'ui'
|
|
|
|
export function Toaster() {
|
|
const { theme } = useTheme()
|
|
return <SonnerToaster position="top-right" theme={theme as 'light' | 'dark' | 'system'} />
|
|
}
|