mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
This is in continue to: - #850 - #848 The last files should be converted as part of this PR, there are only a handful left.
31 lines
775 B
TypeScript
31 lines
775 B
TypeScript
import React from 'react'
|
|
|
|
import {latest} from '@maplibre/maplibre-gl-style-spec'
|
|
import Block from './Block'
|
|
import FieldNumber from './FieldNumber'
|
|
|
|
type BlockMaxZoomProps = {
|
|
value?: number
|
|
onChange(...args: unknown[]): unknown
|
|
error?: {message: string}
|
|
};
|
|
|
|
export default class BlockMaxZoom extends React.Component<BlockMaxZoomProps> {
|
|
render() {
|
|
return <Block label={"Max Zoom"} fieldSpec={latest.layer.maxzoom}
|
|
error={this.props.error}
|
|
data-wd-key="max-zoom"
|
|
>
|
|
<FieldNumber
|
|
allowRange={true}
|
|
value={this.props.value}
|
|
onChange={this.props.onChange}
|
|
min={latest.layer.maxzoom.minimum}
|
|
max={latest.layer.maxzoom.maximum}
|
|
default={latest.layer.maxzoom.maximum}
|
|
/>
|
|
</Block>
|
|
}
|
|
}
|
|
|