mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* Copy the design-system app into a new one for ui-library. * Remove unneeded content. * Add supabase config. * Cleanup the css. * Add bunch of packages. * Cleanup the registry. * Regenerate the registry. * Add needed components for documenting components. * Add the pages for the components. * Fix the RegistryBlock. * Various fixes. * Add a turbo definition for ui-library. * Rename Remix to React Router. * Reorder the pages for all frameworks. * Remove the bottom pager. * Fix the pages and command menu. * Various fixes. * Minor fixes. * Add ai editor rules. * Various fixes. * Add local supabase env vars. * Try to fix a package error. * Bunch of various fixes. * Fix lint errors.
25 lines
602 B
TypeScript
25 lines
602 B
TypeScript
import { Style } from '@/registry/styles'
|
|
// import { Theme } from '@/registry/themes'
|
|
import { useAtom } from 'jotai'
|
|
import { atomWithStorage } from 'jotai/utils'
|
|
import { ComponentProps } from 'react'
|
|
import { SonnerToaster } from 'ui'
|
|
|
|
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)
|
|
}
|