Skip to content

Instantly share code, notes, and snippets.

@jacky810124
Last active October 31, 2019 15:14
Show Gist options
  • Save jacky810124/e5aff7df150ed99bd39a6e3ea22bfb4e to your computer and use it in GitHub Desktop.
Save jacky810124/e5aff7df150ed99bd39a6e3ea22bfb4e to your computer and use it in GitHub Desktop.
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