this.handleChange(i)}
>
{option.checked && (
diff --git a/src/components/widgets/ColorPicker.js b/src/components/widgets/ColorPicker.js
index 84b41d40e..c2ca80580 100644
--- a/src/components/widgets/ColorPicker.js
+++ b/src/components/widgets/ColorPicker.js
@@ -96,19 +96,13 @@ class ColorPicker extends Component {
/>
-
{this.state.isVisible && (
-
+
)}
);
diff --git a/src/components/widgets/ColorscalePicker.js b/src/components/widgets/ColorscalePicker.js
index f95256e15..515a3cf61 100644
--- a/src/components/widgets/ColorscalePicker.js
+++ b/src/components/widgets/ColorscalePicker.js
@@ -1,7 +1,4 @@
-import ColorscalePicker, {
- Colorscale,
- COLOR_PICKER_CONSTANTS,
-} from 'react-colorscales';
+import ColorscalePicker, {Colorscale, COLOR_PICKER_CONSTANTS} from 'react-colorscales';
import Dropdown from './Dropdown';
import Info from '../fields/Info';
import PropTypes from 'prop-types';
@@ -33,14 +30,11 @@ class Scale extends Component {
render() {
const {onColorscaleChange, selected} = this.props;
const {selectedColorscaleType, showColorscalePicker} = this.state;
- const description =
- COLOR_PICKER_CONSTANTS.COLORSCALE_DESCRIPTIONS[selectedColorscaleType];
- const colorscaleOptions = COLOR_PICKER_CONSTANTS.COLORSCALE_TYPES.map(
- type => ({
- label: type + ' scales',
- value: type,
- })
- );
+ const description = COLOR_PICKER_CONSTANTS.COLORSCALE_DESCRIPTIONS[selectedColorscaleType];
+ const colorscaleOptions = COLOR_PICKER_CONSTANTS.COLORSCALE_TYPES.map(type => ({
+ label: type + ' scales',
+ value: type,
+ }));
const _ = this.context.localize;
return (
diff --git a/src/components/widgets/Dropzone.js b/src/components/widgets/Dropzone.js
index 28aa6eb2e..4fa9da2ae 100644
--- a/src/components/widgets/Dropzone.js
+++ b/src/components/widgets/Dropzone.js
@@ -12,9 +12,7 @@ class Dropzone extends Component {
};
this.validFiletypes = {
- image: _(
- 'image/jpeg, image/jpg, image/svg, image/png, image/gif, image/bmp, image/webp'
- ),
+ image: _('image/jpeg, image/jpg, image/svg, image/png, image/gif, image/bmp, image/webp'),
};
this.onDrop = this.onDrop.bind(this);
@@ -26,16 +24,11 @@ class Dropzone extends Component {
if (this.props.fileType === 'image') {
return (
-
+
);
}
- return (
-
{_('File loaded!')}
- );
+ return
{_('File loaded!')}
;
}
componentWillMount() {
@@ -52,17 +45,13 @@ class Dropzone extends Component {
{_('Drop the ') +
this.props.fileType +
- _(
- ' to upload here or click to choose a file from your computer.'
- )}
+ _(' to upload here or click to choose a file from your computer.')}
{this.props.fileType === 'image' ? (
{_('Supported formats are: ') +
- this.validFiletypes[this.props.fileType]
- .split('image/')
- .join('') +
+ this.validFiletypes[this.props.fileType].split('image/').join('') +
'.'}
) : null}
@@ -81,11 +70,7 @@ class Dropzone extends Component {
const parsingError = (
{_('Yikes! An error occurred while parsing this file.')}
-
- {_('Try again with a supported file format: ') +
- supportedFileTypes +
- '.'}
-
+
{_('Try again with a supported file format: ') + supportedFileTypes + '.'}
);
@@ -115,9 +100,7 @@ class Dropzone extends Component {
{_('Yikes! You can only upload one file at a time.')}
- {_(
- 'To upload multiple files, create multiple files and upload them individually.'
- )}
+ {_('To upload multiple files, create multiple files and upload them individually.')}
),
@@ -141,9 +124,7 @@ class Dropzone extends Component {
content: (
- {_("Yikes! This doesn't look like a valid ") +
- this.props.fileType +
- _(' to us. ')}
+ {_("Yikes! This doesn't look like a valid ") + this.props.fileType + _(' to us. ')}
{_('Try again with a ') + supportedFileTypes + ' file.'}
diff --git a/src/components/widgets/RadioBlocks.js b/src/components/widgets/RadioBlocks.js
index f90407304..05b1f5e76 100644
--- a/src/components/widgets/RadioBlocks.js
+++ b/src/components/widgets/RadioBlocks.js
@@ -59,22 +59,14 @@ class RadioBlocks extends Component {
RadioBlocks.propTypes = {
options: PropTypes.arrayOf(
PropTypes.shape({
- value: PropTypes.oneOfType([
- PropTypes.string,
- PropTypes.bool,
- PropTypes.number,
- ]).isRequired,
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number]).isRequired,
label: PropTypes.string,
icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
disabled: PropTypes.bool,
})
),
onOptionChange: PropTypes.func.isRequired,
- activeOption: PropTypes.oneOfType([
- PropTypes.string,
- PropTypes.bool,
- PropTypes.number,
- ]),
+ activeOption: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number]),
radioClassName: PropTypes.string,
// One of right, left, center
diff --git a/src/components/widgets/SymbolSelector.js b/src/components/widgets/SymbolSelector.js
index af4128a86..687e170bf 100644
--- a/src/components/widgets/SymbolSelector.js
+++ b/src/components/widgets/SymbolSelector.js
@@ -15,10 +15,7 @@ export default class SymbolSelector extends Component {
shouldComponentUpdate(nextProps, nextState) {
const {markerColor, borderColor} = this.props;
- const {
- markerColor: nextMarkerColor,
- borderColor: nextBorderColor,
- } = nextProps;
+ const {markerColor: nextMarkerColor, borderColor: nextBorderColor} = nextProps;
return (
this.props.value !== nextProps.value ||
@@ -86,12 +83,7 @@ export default class SymbolSelector extends Component {
this.togglePanel();
}}
>
-