Created
March 18, 2015 23:33
-
-
Save AndrewRayCode/b4c47054fbdb470820c0 to your computer and use it in GitHub Desktop.
This file contains 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
// Top level component | |
<component> | |
<UserModal isOpen={this.state.whatever} /> | |
</component> | |
// UserModal | |
{ | |
render:function() { | |
return <BaseModal {...this.props}> | |
content | |
</BaseModal>; | |
} | |
} | |
// BaseModal | |
{ | |
mixins:[OverlayMixin], | |
renderOverlay: function () { | |
if (!this.props.isOpen) { | |
return <span/>; | |
} | |
return <Modal {...this.props}> | |
{this.props.children} | |
</Modal>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment