Updates for Mar 09, 2022

Improved modals manager api

The modals manager open method now accepts custom modal components directly, allowing you to reduce even more boilerplate code.

import * as React from 'react'
import { useModals, Button } from '@saas-ui/react'
import CustomModal from './custom-modal'
export default function Page() {
const modals = useModals()
return <Button onClick={() => modals.open(CustomModal)}>Open modal</Button>


Patch Changes

  • 99f3e33: Custom modal components can now be directly passed to modals.open
  • Updated dependencies [99f3e33]
    • @saas-ui/modals@0.3.5

Was this helpful?