Skip to content

Instantly share code, notes, and snippets.

@oxpa
Created July 9, 2018 10:58
Show Gist options
  • Save oxpa/93dab71580c25363fb011a7bd40044e3 to your computer and use it in GitHub Desktop.
Save oxpa/93dab71580c25363fb011a7bd40044e3 to your computer and use it in GitHub Desktop.
dialogs
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