mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
Introduce custom input elems for modals
This commit is contained in:
23
src/components/inputs/StringInput.jsx
Normal file
23
src/components/inputs/StringInput.jsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react'
|
||||
import input from '../../config/input.js'
|
||||
|
||||
class StringInput extends React.Component {
|
||||
static propTypes = {
|
||||
value: React.PropTypes.string.isRequired,
|
||||
style: React.PropTypes.object,
|
||||
onChange: React.PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
return <input
|
||||
style={{
|
||||
...input.input,
|
||||
...this.props.style
|
||||
}}
|
||||
value={this.props.value}
|
||||
onChange={e => this.props.onChange(e.target.value)}
|
||||
/>
|
||||
}
|
||||
}
|
||||
|
||||
export default StringInput
|
||||
Reference in New Issue
Block a user