You can't pass custom content into them, they only took a title and a message.
The animation on close was janky, and half the content would disapear while it was animating.
Basically I went ground up here, deleted all our old modal stuff and started fresh. react-modal-hook simply replaces some of our hooks that we had and makes things a bit more robust. Now that we can pass custom content in as well, I made some of the modal message more descriptive.
Remove old confirmation modal stuff. Lean on react-modal-hook instead
Add react-transition-group to handle animations correctly when closing a modal.
Replaced all modals with the new modals
Added useModalWithData to allow us to pass data into the modal directly if needed.
Created SimpleConfirmModal to wrap some of the common use cases.
Styled the modal in an appealing and consistent way.
Our old modals had a few problems:
Basically I went ground up here, deleted all our old modal stuff and started fresh.
react-modal-hook
simply replaces some of our hooks that we had and makes things a bit more robust. Now that we can pass custom content in as well, I made some of the modal message more descriptive.react-modal-hook
insteaduseModalWithData
to allow us to pass data into the modal directly if needed.SimpleConfirmModal
to wrap some of the common use cases.