Files
supabase/apps/ui-library/components/sonner-expand-config.tsx
Ivan Vasilov 33127bb6ab feat: Library (#34294)
* 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.
2025-03-20 22:11:07 +01:00

38 lines
977 B
TypeScript

import { useConfig } from '@/hooks/use-config'
import { Switch } from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
function SonnerExpandConfig() {
const [config, setConfig] = useConfig()
return (
<div className="px-5 py-5 border rounded-lg my-2 bg-surface-75">
<form>
<FormItemLayout
name="sonnerExpand"
id="sonnerExpand"
isReactForm={false}
label="Use expand prop"
description="You will need to fire a few Sonner toasts first"
layout="flex"
>
<Switch
name="sonnerExpand"
id="sonnerExpand"
size="large"
checked={config.sonnerExpand}
onCheckedChange={(e) =>
setConfig({
...config,
sonnerExpand: e,
})
}
/>
</FormItemLayout>
</form>
</div>
)
}
export { SonnerExpandConfig }