-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi there,
I was looking for a similar approach to use modals with a hook like this, but I was wondering if something like this would be possible, cause this would be a very nice approach:
const { isModalOpen, openModal, closeModal } = useModal(<div>This is my modal</div>);So you are able to pass elements into the useModal hook so you do not have to put any <Modal> logic into the DOM itself, and without passing props either. This is a similar library that allows you to do that, but unfortunately not really active and has some issues. But I think that would be a very nice approach, not sure if it's possible without having to change a lot of things though.
I just think that it would be a nice idea, I would really prefer this method myself to keep my modals out of the structure itself.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request