MailOnline / libreact

NO LONGER MAINTAINED - SEE https://github.com/streamich/libreact INSTEAD
The Unlicense
97 stars 6 forks source link

<OverlayProvider> #36

Closed streamich closed 6 years ago

streamich commented 6 years ago

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:

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

azukaar commented 6 years ago

Shouldn't it do

<OverlayProvider>
 <App />
</OverlayProvider>
streamich commented 6 years ago

@azukaar yeah, could be.

streamich commented 6 years ago

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

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

streamich commented 6 years ago

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

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

streamich commented 6 years ago

Created <Modal> for now instead, here: https://github.com/MailOnline/libreact/pull/38