mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:21:18 +01:00
Fix React type warnings
This commit is contained in:
parent
b50855a4a9
commit
03796c963b
3 changed files with 24 additions and 9 deletions
|
@ -6,10 +6,15 @@ import { margins, fontSizes } from '../../config/scales'
|
||||||
|
|
||||||
class AutocompleteInput extends React.Component {
|
class AutocompleteInput extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: React.PropTypes.string.isRequired,
|
value: React.PropTypes.string,
|
||||||
options: React.PropTypes.array.isRequired,
|
options: React.PropTypes.array,
|
||||||
style: React.PropTypes.object,
|
style: React.PropTypes.object,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: React.PropTypes.func,
|
||||||
|
}
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
onChange: () => {},
|
||||||
|
options: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -7,9 +7,14 @@ import AutocompleteInput from '../inputs/AutocompleteInput'
|
||||||
|
|
||||||
class LayerSourceBlock extends React.Component {
|
class LayerSourceBlock extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: React.PropTypes.string.isRequired,
|
value: React.PropTypes.string,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: React.PropTypes.func,
|
||||||
sourceIds: React.PropTypes.array.isRequired,
|
sourceIds: React.PropTypes.array,
|
||||||
|
}
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
onChange: () => {},
|
||||||
|
sourceIds: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -7,9 +7,14 @@ import AutocompleteInput from '../inputs/AutocompleteInput'
|
||||||
|
|
||||||
class LayerSourceLayer extends React.Component {
|
class LayerSourceLayer extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: React.PropTypes.string.isRequired,
|
value: React.PropTypes.string,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: React.PropTypes.func,
|
||||||
sourceLayerIds: React.PropTypes.array.isRequired,
|
sourceLayerIds: React.PropTypes.array,
|
||||||
|
}
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
onChange: () => {},
|
||||||
|
sourceLayerIds: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in a new issue