Chakra UI modals manager.
Build in modal types:
- Modal
- Drawer
- Form
- Dialog
- ConfirmDialog
- MenuDialog
$ yarn add @saas-ui/modals
#or
$ npm i @saas-ui/modals --save
import { ModalsProvider } from '@saas-ui/modals'
export default App() {
return (
<ModalsProvider>
{children}
</ModalsProvider>
)
}
import { useModals } from '@saas-ui/modals'
function MyComponent() {
const modals = useModals()
modals.open({
title: 'My modal',
body: <>My modal body</>,
})
}
import { useModals } from '@saas-ui/modals'
function MyComponent() {
const modals = useModals()
modals.drawer({
title: 'My drawer',
body: <>My drawer body</>,
})
}
import { useModals } from '@saas-ui/modals'
function MyComponent() {
const modals = useModals()
modals.confirm({
title: 'Delete user',
body: 'Are you sure you want to delete this user?'
onConfirm: () => //delete user
})
}
https://www.saas-ui.dev/docs/overlay/modals-manager
https://github.com/saas-js/saas-ui/tree/next/packages/saas-ui-modals
MIT - Appulse Software