mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 23:50:02 +00:00
- Moved all components into a single directory like nextjs - Made component names consistent with each other - Made component names consistent with their export class names - Added storybook for a few components with the aim to extend this further.
28 lines
587 B
JavaScript
28 lines
587 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import FieldAutocomplete from './FieldAutocomplete'
|
|
|
|
|
|
export default class FieldSymbol extends React.Component {
|
|
static propTypes = {
|
|
value: PropTypes.string,
|
|
icons: PropTypes.array,
|
|
style: PropTypes.object,
|
|
onChange: PropTypes.func.isRequired,
|
|
}
|
|
|
|
static defaultProps = {
|
|
icons: []
|
|
}
|
|
|
|
render() {
|
|
return <FieldAutocomplete
|
|
value={this.props.value}
|
|
options={this.props.icons.map(f => [f, f])}
|
|
onChange={this.props.onChange}
|
|
wrapperStyle={this.props.style}
|
|
/>
|
|
}
|
|
}
|
|
|