mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 05:20:01 +00:00
Fixed more input accessibility issues, also
- Added searchParams based router for easier testing - Added more stories to the storybook
This commit is contained in:
28
src/components/_FieldId.jsx
Normal file
28
src/components/_FieldId.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import {latest} from '@mapbox/mapbox-gl-style-spec'
|
||||
import Block from './Block'
|
||||
import FieldString from './FieldString'
|
||||
|
||||
export default class BlockId extends React.Component {
|
||||
static propTypes = {
|
||||
value: PropTypes.string.isRequired,
|
||||
wdKey: PropTypes.string.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
error: PropTypes.object,
|
||||
}
|
||||
|
||||
render() {
|
||||
return <Block label={"ID"} fieldSpec={latest.layer.id}
|
||||
data-wd-key={this.props.wdKey}
|
||||
error={this.props.error}
|
||||
>
|
||||
<FieldString
|
||||
value={this.props.value}
|
||||
onChange={this.props.onChange}
|
||||
/>
|
||||
</Block>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user