mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-17 20:20:28 +01:00
26 lines
723 B
JavaScript
26 lines
723 B
JavaScript
import React from 'react'
|
|
|
|
import GlSpec from 'mapbox-gl-style-spec/reference/latest.js'
|
|
import InputBlock from '../inputs/InputBlock'
|
|
import NumberInput from '../inputs/NumberInput'
|
|
|
|
class MinZoomBlock extends React.Component {
|
|
static propTypes = {
|
|
value: React.PropTypes.number.isRequired,
|
|
onChange: React.PropTypes.func.isRequired,
|
|
}
|
|
|
|
render() {
|
|
return <InputBlock label={"Min Zoom"} doc={GlSpec.layer.minzoom.doc}>
|
|
<NumberInput
|
|
value={this.props.value}
|
|
onChange={this.props.onChange}
|
|
min={GlSpec.layer.minzoom.minimum}
|
|
max={GlSpec.layer.minzoom.maximum}
|
|
default={GlSpec.layer.minzoom.minimum}
|
|
/>
|
|
</InputBlock>
|
|
}
|
|
}
|
|
|
|
export default MinZoomBlock
|