Created
May 25, 2017 14:33
-
-
Save fpaint/d6abae04012e5bbd84fa275276e3f6b2 to your computer and use it in GitHub Desktop.
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 @ModalPage extends React.Component | |
| componentWillMount: -> | |
| $('body').addClass('noscroll') | |
| key.setScope('modal') | |
| key('esc', 'modal', this.props.close) | |
| componentWillUnmount: -> | |
| $('body').removeClass('noscroll') | |
| key.deleteScope('modal') | |
| render: -> | |
| `<div className='modal_container modal_page screen screen-white'> | |
| <div className='navbar'> | |
| <div className='title'>{this.props.title}</div> | |
| <div className='close' title='Закрыть' onClick={this.props.close} /> | |
| </div> | |
| <div className='content'> | |
| {this.props.children} | |
| </div> | |
| </div>` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment