Modals should be inside Portals #567
Labels
P3 Triaged
Issue has been reviewed as part of legacy backlog grooming (project P3).
Priority: Low
Triaged: new architecture
Triaged, to be addressed in new architecture of the design system
To prevent Modals being accidentally cut off by parent styles we should wrap the modal component in a Portal, like we do for contextual menus:
https://github.com/canonical-web-and-design/react-components/blob/master/src/components/ContextualMenu/ContextualMenu.tsx#L196
We'd need to figure out how to control the display of the Modal as the functions to display/hide the modal would be inside the component:
const { openPortal, closePortal, isOpen, Portal, ref } = usePortal({
The text was updated successfully, but these errors were encountered: