Make possible to specify the container element for the viewer
The viewer does not set nor allows to set a specific element as the container of the modal dialog, and by default modal dialogs use the body element. However, in some cases the viewer needs to be appended to a different element (for example, if a sub-element is shown in fullscreen mode, like done in Talk), as otherwise it would not be visible.
How to test
- Open a conversation in Talk
- Share a picture in the conversation
- Switch to full screen mode
- Try to open the viewer for the picture
Expected result
The viewer is shown.
Actual result
The viewer is not shown (and neither its overlay).
Would it be fine to add a container prop, to pass it to the NcModal's container?
At this point I would like to refactor the Viewer and make it a package alongside this app :see_no_evil: So people can import and call the Viewer