Last active
October 31, 2019 15:14
-
-
Save jacky810124/e5aff7df150ed99bd39a6e3ea22bfb4e 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 style from './styles.scss' | |
class NumericKeyboard extends React.Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
} | |
this.clickKeyboard = this.clickKeyboard.bind(this) | |
} | |
render () { | |
return ( | |
<div className={style['numeric-keyboard-component']}> | |
<div className={style['keys']}> | |
<Button | |
className={`${style['submit-key']} ${this.props.disabled ? style['disabled'] : ''}`} | |
onClick={this.clickKeyboard} | |
> | |
送出 | |
</Button> | |
</div> | |
</div> | |
) | |
} | |
clickKeyboard (event) { | |
if (this.props.disabled) { | |
return | |
} | |
this.props.clickHandler(event, key) | |
} | |
} | |
export default NumericKeyboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment