mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
Sorted all imports in all packages, `cms`, `design-system` and `ui-library` apps by running `pnpm format` on them. All changes in this PR are done by the script.
32 lines
801 B
TypeScript
32 lines
801 B
TypeScript
import { useAtom } from 'jotai'
|
|
import { atomWithStorage } from 'jotai/utils'
|
|
import { ComponentProps } from 'react'
|
|
import { SonnerToaster } from 'ui'
|
|
|
|
import { Style } from '@/registry/styles'
|
|
import { Theme } from '@/registry/themes'
|
|
|
|
// import { BackendProvider } from '@/registry/backend-provider'
|
|
|
|
type Config = {
|
|
style: Style['name']
|
|
theme: Theme['name']
|
|
radius: number
|
|
sonnerPosition: ComponentProps<typeof SonnerToaster>['position']
|
|
sonnerExpand: boolean
|
|
// backendProvider: BackendProvider['name'] | undefined
|
|
}
|
|
|
|
const configAtom = atomWithStorage<Config>('config', {
|
|
style: 'default',
|
|
theme: 'zinc',
|
|
radius: 0.5,
|
|
sonnerPosition: 'bottom-right',
|
|
sonnerExpand: false,
|
|
// backendProvider: 'nextjs-auth',
|
|
})
|
|
|
|
export function useConfig() {
|
|
return useAtom(configAtom)
|
|
}
|