mirror of
https://github.com/supabase/supabase.git
synced 2026-05-18 02:44:56 +08: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.
26 lines
603 B
TypeScript
26 lines
603 B
TypeScript
// import { Theme } from '@/registry/themes'
|
|
import { useAtom } from 'jotai'
|
|
import { atomWithStorage } from 'jotai/utils'
|
|
import { ComponentProps } from 'react'
|
|
import { SonnerToaster } from 'ui'
|
|
|
|
import { Style } from '@/registry/styles'
|
|
|
|
type Config = {
|
|
style: Style['name']
|
|
radius: number
|
|
sonnerPosition: ComponentProps<typeof SonnerToaster>['position']
|
|
sonnerExpand: boolean
|
|
}
|
|
|
|
const configAtom = atomWithStorage<Config>('config', {
|
|
style: 'default',
|
|
radius: 0.5,
|
|
sonnerPosition: 'bottom-right',
|
|
sonnerExpand: false,
|
|
})
|
|
|
|
export function useConfig() {
|
|
return useAtom(configAtom)
|
|
}
|