diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-04-30 14:00:07 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-02 11:14:19 +0900 |
commit | c60d0e7392fc708e961614d6b756a045de74f458 (patch) | |
tree | 0b9a5fce1879e38a92d5dbb2915779aee0ad22d6 /src/settings/components/form/KeymapsForm.jsx | |
parent | 257162e5b6b4993e1dff0d705ffa6f0d809033eb (diff) |
Rename .js/.jsx to .ts/.tsx
Diffstat (limited to 'src/settings/components/form/KeymapsForm.jsx')
-rw-r--r-- | src/settings/components/form/KeymapsForm.jsx | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/settings/components/form/KeymapsForm.jsx b/src/settings/components/form/KeymapsForm.jsx deleted file mode 100644 index 01acf61..0000000 --- a/src/settings/components/form/KeymapsForm.jsx +++ /dev/null @@ -1,51 +0,0 @@ -import './KeymapsForm.scss'; -import React from 'react'; -import PropTypes from 'prop-types'; -import Input from '../ui/Input'; -import keymaps from '../../keymaps'; - -class KeymapsForm extends React.Component { - - render() { - return <div className='form-keymaps-form'> - { - keymaps.fields.map((group, index) => { - return <div key={index} className='form-keymaps-form-field-group'> - { - group.map((field) => { - let name = field[0]; - let label = field[1]; - let value = this.props.value[name] || ''; - return <Input - type='text' id={name} name={name} key={name} - label={label} value={value} - onChange={this.bindValue.bind(this)} - onBlur={this.props.onBlur} - />; - }) - } - </div>; - }) - } - </div>; - } - - bindValue(e) { - let next = { ...this.props.value }; - next[e.target.name] = e.target.value; - - this.props.onChange(next); - } -} - -KeymapsForm.propTypes = { - value: PropTypes.objectOf(PropTypes.string), - onChange: PropTypes.func, -}; - -KeymapsForm.defaultProps = { - value: {}, - onChange: () => {}, -}; - -export default KeymapsForm; |