Created
July 13, 2020 09:34
-
-
Save Aslemammad/f2b36beb7ee68f2c0e5453abe1b7f933 to your computer and use it in GitHub Desktop.
App.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Reoverlay, ModalContainer } from 'reoverlay'; | |
import { AuthModal, DeleteModal, ConfirmModal } from '../modals'; | |
// Here you pass your modals to Reoverlay | |
Reoverlay.config([ | |
{ | |
name: "AuthModal", | |
component: AuthModal | |
}, | |
{ | |
name: "DeleteModal", | |
component: DeleteModal | |
}, | |
{ | |
name: "ConfirmModal", | |
component: ConfirmModal | |
} | |
]) | |
const App = () => { | |
return ( | |
<> | |
... | |
<Routes /> | |
... | |
<ModalContainer /> | |
</> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment