Custom Modal Stack
It is possible to customize the modal stack and how modals are rendered. For example,
you may wish to display opened modals all the time. This can be achieved by overriding
the modal
snippet in the ModalStack
component.
Notice how clicking “close” on a modal in the background will close that modal
rather than the one on the top. This is because these modal components
use the close()
prop, which will dismiss that modal specifically.
You can also close a modal by using modals.closeById(id)
and passing an id to the modal.