MailOnline/libreact

<OverlayProvider>

Closed this issue · 5 comments

Add an optional <OverlayProvider> component that will work together with <Overlay> component to provide better experience. It would we be a render prop that injects disabled prop into its child <App> component.

<OverlayProvider component={App} />

This would allow <App> to set properly:

  • aria-hidden
  • inert
  • pointer-events: none

Maybe also create generic <App> component that does all of that.

Shouldn't it do

<OverlayProvider>
 <App />
</OverlayProvider>

@azukaar yeah, could be.

@azukaar I have extracted interface creation in a separate lib:

https://github.com/streamich/react-universal-interface

Actually, maybe better create <Modal> component that uses <Overlay> internally, and <ModalManager> instead of <OverlayProvider>.

Also: https://www.youtube.com/watch?v=JS68faEUduk

Created <Modal> for now instead, here: #38