Show hints in the source modal as well

This commit is contained in:
Lukas Martinelli
2017-01-09 22:44:22 +01:00
parent a3caf8499c
commit d3276829b2
3 changed files with 12 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ class SettingsModal extends React.Component {
onOpenToggle={this.props.onOpenToggle}
title={'Style Settings'}
>
<InputBlock label={"Name"} doc={GlSpec['$root'].name.doc}>
<InputBlock label={"Name"} doc={GlSpec.$root.name.doc}>
<StringInput {...inputProps}
value={this.props.mapStyle.name}
onChange={this.changeStyleProperty.bind(this, "name")}
@@ -58,14 +58,14 @@ class SettingsModal extends React.Component {
onChange={this.changeStyleProperty.bind(this, "owner")}
/>
</InputBlock>
<InputBlock label={"Sprite URL"} doc={GlSpec['$root'].sprite.doc}>
<InputBlock label={"Sprite URL"} doc={GlSpec.$root.sprite.doc}>
<StringInput {...inputProps}
value={this.props.mapStyle.sprite}
onChange={this.changeStyleProperty.bind(this, "sprite")}
/>
</InputBlock>
<InputBlock label={"Glyphs URL"} doc={GlSpec['$root'].glyphs.doc}>
<InputBlock label={"Glyphs URL"} doc={GlSpec.$root.glyphs.doc}>
<StringInput {...inputProps}
value={this.props.mapStyle.glyphs}
onChange={this.changeStyleProperty.bind(this, "glyphs")}

View File

@@ -1,4 +1,5 @@
import React from 'react'
import GlSpec from 'mapbox-gl-style-spec/reference/latest.js'
import Modal from './Modal'
import Heading from '../Heading'
import Button from '../Button'
@@ -163,13 +164,13 @@ class AddSource extends React.Component {
render() {
return <div>
<InputBlock label={"Source ID"}>
<InputBlock label={"Source ID"} doc={"Unique ID that identifies the source and is used in the layer to reference the source."}>
<StringInput
value={this.state.sourceId}
onChange={v => this.setState({ sourceId: v})}
/>
</InputBlock>
<InputBlock label={"Source Type"}>
<InputBlock label={"Source Type"} doc={GlSpec.source_tile.type.doc}>
<SelectInput
options={[
['geojson', 'GeoJSON'],