mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-08 05:30:55 +01:00
27 lines
777 B
JavaScript
27 lines
777 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
import styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec'
|
|
import InputBlock from '../inputs/InputBlock'
|
|
import NumberInput from '../inputs/NumberInput'
|
|
|
|
class MaxZoomBlock extends React.Component {
|
|
static propTypes = {
|
|
value: PropTypes.number,
|
|
onChange: PropTypes.func.isRequired,
|
|
}
|
|
|
|
render() {
|
|
return <InputBlock label={"Max Zoom"} doc={styleSpec.latest.layer.maxzoom.doc}>
|
|
<NumberInput
|
|
value={this.props.value}
|
|
onChange={this.props.onChange}
|
|
min={styleSpec.latest.layer.maxzoom.minimum}
|
|
max={styleSpec.latest.layer.maxzoom.maximum}
|
|
default={styleSpec.latest.layer.maxzoom.maximum}
|
|
/>
|
|
</InputBlock>
|
|
}
|
|
}
|
|
|
|
export default MaxZoomBlock
|