Created
June 3, 2016 09:07
-
-
Save Riccardo-Zanutta/4f45589483921ff8d7cc926da2131c36 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
import React from 'react' | |
import ReactDom from 'react-dom' | |
import classNames from 'classnames' | |
import Qreader from '../components/login/Qreader' | |
class Login extends React.Component { | |
constructor () { | |
super() | |
this.state = { | |
logged: false | |
} | |
} | |
render () { | |
const componentClass = classNames( | |
'login', | |
'modal-container', | |
{'active' : this.props.visible} | |
) | |
return ( | |
<div className={componentClass}> | |
<div className='modal'> | |
<h3 className='login-title modal-title'>Login</h3> | |
<div className='login-content modal-content'> | |
<Qreader /> | |
</div> | |
<button className='modal-button' onClick={this.sendLogin.bind(this)}>Prosegui senza login</button> | |
</div> | |
</div> | |
) | |
} | |
/* Funzione che invia alla classe genitore il risultato del login avvenuto */ | |
sendLogin () { | |
this.props.sendLogin(this.state.logged) | |
} | |
} | |
export default Login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment