import React from 'react' import Modal from './Modal' import Heading from '../Heading' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import SourceTypeEditor from '../sources/SourceTypeEditor' import publicSources from '../../config/tilesets.json' import colors from '../../config/colors' import { margins, fontSizes } from '../../config/scales' import AddIcon from 'react-icons/lib/md/add-circle-outline' class PublicSource extends React.Component { static propTypes = { id: React.PropTypes.string.isRequired, type: React.PropTypes.string.isRequired, title: React.PropTypes.string.isRequired, description: React.PropTypes.string.isRequired, onSelect: React.PropTypes.func.isRequired, } render() { return
{this.props.title}
#{this.props.id}
Add
} } class SourceEditorLayout extends React.Component { static propTypes = { sourceId: React.PropTypes.string.isRequired, source: React.PropTypes.object.isRequired, } render() { const inputProps = { } return
#{this.props.sourceId} Remove
} } class SourcesModal extends React.Component { static propTypes = { mapStyle: React.PropTypes.object.isRequired, isOpen: React.PropTypes.bool.isRequired, toggle: React.PropTypes.func.isRequired, } render() { const activeSources = Object.keys(this.props.mapStyle.sources).map(sourceId => { const source = this.props.mapStyle.sources[sourceId] return }) const tilesetOptions = publicSources.filter(tileset => !(tileset.id in this.props.mapStyle.sources)).map(tileset => { return }) const inputProps = { } return Active Sources {activeSources} Add New Source Choose Public Source

Add one of the publicly availble sources to your style.

{tilesetOptions}
} } export default SourcesModal