canonical / canonical/react-components
Modals should be inside Portals
Open
P3 Triaged
Priority: Low
Triaged: new architecture
- Dominant language
- TypeScript
- Stars
- 151
- Forks
- 74
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 11
Description
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({`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.