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

@@ -8,6 +8,7 @@ class Modal extends React.Component {
isOpen: PropTypes.bool.isRequired,
title: PropTypes.string.isRequired,
onOpenToggle: PropTypes.func.isRequired,
children: PropTypes.node,
}
render() {

View File

@@ -77,7 +77,7 @@ class OpenModal extends React.Component {
}
onOpenUrl() {
const url = this.refs.styleUrl.value;
const url = this.styleUrlElement.value;
this.onStyleSelect(url);
}
@@ -151,7 +151,7 @@ class OpenModal extends React.Component {
<p>
Load from a URL. Note that the URL must have <a href="https://enable-cors.org" target="_blank" rel="noopener noreferrer">CORS enabled</a>.
</p>
<input type="text" ref="styleUrl" className="maputnik-input" placeholder="Enter URL..."/>
<input type="text" ref={(input) => this.styleUrlElement = input} className="maputnik-input" placeholder="Enter URL..."/>
<div>
<Button className="maputnik-big-button" onClick={this.onOpenUrl.bind(this)}>Open URL</Button>
</div>