Created
July 9, 2018 10:58
-
-
Save oxpa/93dab71580c25363fb011a7bd40044e3 to your computer and use it in GitHub Desktop.
dialogs
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
class PlainDialog extends React.Component { | |
render = () => { | |
const props = this.props | |
let Dialog = () => null | |
if (props.modalType == 'syncsub') {Dialog = EditSubscriptionDialog} | |
if (props.modalType == 'adduser') {Dialog = AddUserDialog} | |
if (props.modalType == 'edituser') {Dialog = AddUserDialog} | |
if (props.modalType == 'complete') {Dialog = CompleteDialog} | |
if (props.modalType == 'progress') {Dialog = ProgressDialog} | |
if (props.modalType == 'decision') {Dialog = DecisionDialog} | |
return <Modal isOpen={props.isOpen} className={"modal " + props.modalType} | |
overlayClassName="overlay zeros flex-col" | |
onRequestClose={props.hideDialog} contentLabel=""> | |
<Dialog /> | |
</Modal> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment