Fixed eslint errors.

This commit is contained in:
orangemug
2017-11-08 08:47:36 +00:00
parent e0b7cdf9dd
commit 8234c51412
17 changed files with 127 additions and 65 deletions

View File

@@ -25,27 +25,46 @@ import OpenModal from './modals/OpenModal'
import style from '../libs/style'
function IconText(props) {
return <span className="maputnik-icon-text">{props.children}</span>
class IconText extends React.Component {
static propTypes = {
children: PropTypes.node,
}
render() {
return <span className="maputnik-icon-text">{this.props.children}</span>
}
}
function ToolbarLink(props) {
return <a
className={classnames('maputnik-toolbar-link', props.className)}
href={props.href}
target={"blank"}
>
{props.children}
</a>
class ToolbarLink extends React.Component {
static propTypes = {
className: PropTypes.string,
children: PropTypes.node,
}
render() {
return <a
className={classnames('maputnik-toolbar-link', this.props.className)}
href={this.props.href}
target={"blank"}
>
{this.props.children}
</a>
}
}
function ToolbarAction(props) {
return <a
className='maputnik-toolbar-action'
onClick={props.onClick}
>
{props.children}
</a>
class ToolbarAction extends React.Component {
static propTypes = {
children: PropTypes.node
}
render() {
return <a
className='maputnik-toolbar-action'
onClick={this.props.onClick}
>
{this.props.children}
</a>
}
}
export default class Toolbar extends React.Component {
@@ -57,7 +76,8 @@ export default class Toolbar extends React.Component {
onStyleOpen: PropTypes.func.isRequired,
// A dict of source id's and the available source layers
sources: PropTypes.object.isRequired,
onInspectModeToggle: PropTypes.func.isRequired
onInspectModeToggle: PropTypes.func.isRequired,
children: PropTypes.node
}
constructor(props) {