import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import MdFileDownload from 'react-icons/lib/md/file-download' import OpenIcon from 'react-icons/lib/md/open-in-browser' import SettingsIcon from 'react-icons/lib/md/settings' import SourcesIcon from 'react-icons/lib/md/layers' import HelpIcon from 'react-icons/lib/md/help-outline' import InspectionIcon from 'react-icons/lib/md/find-in-page' import SurveyIcon from 'react-icons/lib/md/assignment-turned-in' import ColorIcon from 'react-icons/lib/md/color-lens' import MapIcon from 'react-icons/lib/md/map' import ViewIcon from 'react-icons/lib/md/remove-red-eye' import logoImage from 'maputnik-design/logos/logo-color.svg' import pkgJson from '../../package.json' class IconText extends React.Component { static propTypes = { children: PropTypes.node, } render() { return {this.props.children} } } class ToolbarLink extends React.Component { static propTypes = { className: PropTypes.string, children: PropTypes.node, href: PropTypes.string, onToggleModal: PropTypes.func, } render() { return {this.props.children} } } class ToolbarLinkHighlighted extends React.Component { static propTypes = { className: PropTypes.string, children: PropTypes.node, href: PropTypes.string, onToggleModal: PropTypes.func } render() { return {this.props.children} } } class ToolbarSelect extends React.Component { static propTypes = { children: PropTypes.node, wdKey: PropTypes.string } render() { return
{this.props.children}
} } class ToolbarAction extends React.Component { static propTypes = { children: PropTypes.node, onClick: PropTypes.func, wdKey: PropTypes.string } render() { return } } export default class Toolbar extends React.Component { static propTypes = { mapStyle: PropTypes.object.isRequired, inspectModeEnabled: PropTypes.bool.isRequired, onStyleChanged: PropTypes.func.isRequired, // A new style has been uploaded onStyleOpen: PropTypes.func.isRequired, // A dict of source id's and the available source layers sources: PropTypes.object.isRequired, children: PropTypes.node, onToggleModal: PropTypes.func, onSetMapState: PropTypes.func, mapState: PropTypes.string, } state = { isOpen: { settings: false, sources: false, open: false, add: false, export: false, } } handleSelection(val) { this.props.onSetMapState(val); } render() { const views = [ { id: "map", title: "Map", icon: , }, { id: "inspect", title: "Inspect", icon: , }, { id: "filter-deuteranopia", title: "Map (deuteranopia)", icon: , }, { id: "filter-protanopia", title: "Map (protanopia)", icon: , }, { id: "filter-tritanopia", title: "Map (tritanopia)", icon: , }, { id: "filter-achromatopsia", title: "Map (achromatopsia)", icon: , }, ]; const currentView = views.find((view) => { return view.id === this.props.mapState; }); return
Open Export Data Sources Style Settings View Help Take the Maputnik Survey
} }