Feature request: system similar to that of notifications, but for a modal #405
justinsmid
started this conversation in
Feedback
Replies: 3 comments 3 replies
-
Good idea imo |
Beta Was this translation helpful? Give feedback.
0 replies
-
I was thinking about this feature and I think we will work on this, but not in such form. My idea was that you create a set of Modal components like this: const components = {
login: <LoginForm />,
confirm: <Cornfirm />,
// ...other modals
}; And then show them with a hook: const modal = useModal('login');
modal.show({ title: 'Login', onClose: console.log }); |
Beta Was this translation helpful? Give feedback.
2 replies
-
Modals package was added as a part of 3.2 release – https://mantine.dev/others/modals/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to have a way to programatically show a modal, similarly to how the notifications system works.
Specifically, my use case is showing a confirmation modal whenever a user tries to delete an item. I'd like to be able to call something like
Or perhaps more generally
Without explicitly having to render a Modal with all of the content and keep track of its state, etc.
Beta Was this translation helpful? Give feedback.
All reactions