Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

remove react.createClass, use es classes instead

Adam Krebsd98093f40f47
diff --git a/src/components/common/icons/add.js b/src/components/common/icons/add.js
index 0510de859..1aa7ae3d0 100644
--- a/src/components/common/icons/add.js
+++ b/src/components/common/icons/add.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Add = React.createClass({
- displayName: 'Add',
- propTypes: {
+class Add extends React.Component {
+ static displayName = 'Add';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-add'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-add'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const Add = React.createClass({
</Base>
);
}
-});
+}
export default Add;
diff --git a/src/components/common/icons/arrow-down.js b/src/components/common/icons/arrow-down.js
index 79aa90b74..c0c242e74 100644
--- a/src/components/common/icons/arrow-down.js
+++ b/src/components/common/icons/arrow-down.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const ArrowDown = React.createClass({
- displayName: 'ArrowDown',
- propTypes: {
+class ArrowDown extends React.Component {
+ static displayName = 'ArrowDown';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-arrowdown'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-arrowdown'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const ArrowDown = React.createClass({
</Base>
);
}
-});
+}
export default ArrowDown;
diff --git a/src/components/common/icons/arrow-left.js b/src/components/common/icons/arrow-left.js
index 29f6598fb..514923cda 100644
--- a/src/components/common/icons/arrow-left.js
+++ b/src/components/common/icons/arrow-left.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const ArrowLeft = React.createClass({
- displayName: 'ArrowLeft',
- propTypes: {
+class ArrowLeft extends React.Component {
+ static displayName = 'ArrowLeft';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-arrowleft'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-arrowleft'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const ArrowLeft = React.createClass({
</Base>
);
}
-});
+}
export default ArrowLeft;
diff --git a/src/components/common/icons/arrow-right.js b/src/components/common/icons/arrow-right.js
index ce18a1001..1872d067a 100644
--- a/src/components/common/icons/arrow-right.js
+++ b/src/components/common/icons/arrow-right.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const ArrowRight = React.createClass({
- displayName: 'ArrowRight',
- propTypes: {
+class ArrowRight extends React.Component {
+ static displayName = 'ArrowRight';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-arrowright'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-arrowright'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const ArrowRight = React.createClass({
</Base>
);
}
-});
+}
export default ArrowRight;
diff --git a/src/components/common/icons/base.js b/src/components/common/icons/base.js
index cb53fbdef..86ebf0212 100644
--- a/src/components/common/icons/base.js
+++ b/src/components/common/icons/base.js
@@ -29,9 +29,10 @@ const getStyleClassFromColor = (totalColor, colors) =>
''
);
-const Base = React.createClass({
- displayName: 'Base Icon',
- propTypes: {
+class Base extends React.Component {
+ static displayName = 'Base Icon';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string,
/** Set the width of the icon, ex. '16px' */
@@ -43,16 +44,16 @@ const Base = React.createClass({
predefinedClassName: PropTypes.string,
className: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: null,
- width: null,
- viewBox: '0 0 64 64',
- predefinedClassName: '',
- className: ''
- };
- },
+ };
+
+ static defaultProps = {
+ height: null,
+ width: null,
+ viewBox: '0 0 64 64',
+ predefinedClassName: '',
+ className: ''
+ };
+
render() {
const {
height,
@@ -90,6 +91,6 @@ const Base = React.createClass({
</svg>
);
}
-});
+}
export default Base;
diff --git a/src/components/common/icons/clock.js b/src/components/common/icons/clock.js
index 31707c080..3cd2ae766 100644
--- a/src/components/common/icons/clock.js
+++ b/src/components/common/icons/clock.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Clock = React.createClass({
- displayName: 'Clock',
- propTypes: {
+class Clock extends React.Component {
+ static displayName = 'Clock';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-clock'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-clock'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const Clock = React.createClass({
</Base>
);
}
-});
+}
export default Clock;
diff --git a/src/components/common/icons/close.js b/src/components/common/icons/close.js
index cda62c23d..61ab57dd8 100644
--- a/src/components/common/icons/close.js
+++ b/src/components/common/icons/close.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Close = React.createClass({
- displayName: 'Close',
- propTypes: {
+class Close extends React.Component {
+ static displayName = 'Close';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-closewindow'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-closewindow'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -47,6 +48,6 @@ const Close = React.createClass({
</Base>
);
}
-});
+}
export default Close;
diff --git a/src/components/common/icons/cube-3d.js b/src/components/common/icons/cube-3d.js
index b97b965b9..c4553735a 100644
--- a/src/components/common/icons/cube-3d.js
+++ b/src/components/common/icons/cube-3d.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Cube3D = React.createClass({
- displayName: 'Cube3D',
- propTypes: {
+class Cube3D extends React.Component {
+ static displayName = 'Cube3D';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-cube3d'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-cube3d'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -43,6 +44,6 @@ const Cube3D = React.createClass({
</Base>
);
}
-});
+}
export default Cube3D;
diff --git a/src/components/common/icons/cursor-click.js b/src/components/common/icons/cursor-click.js
index 9ae297974..459d2d639 100644
--- a/src/components/common/icons/cursor-click.js
+++ b/src/components/common/icons/cursor-click.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const CursorClick = React.createClass({
- displayName: 'CursorClick',
- propTypes: {
+class CursorClick extends React.Component {
+ static displayName = 'CursorClick';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-cursorclick'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-cursorclick'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -45,6 +46,6 @@ const CursorClick = React.createClass({
</Base>
);
}
-});
+}
export default CursorClick;
diff --git a/src/components/common/icons/delete.js b/src/components/common/icons/delete.js
index e1bfaea54..0f07df3b8 100644
--- a/src/components/common/icons/delete.js
+++ b/src/components/common/icons/delete.js
@@ -22,17 +22,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Cross = React.createClass({
- displayName: 'Cross',
- propTypes: {
+class Cross extends React.Component {
+ static displayName = 'Cross';
+
+ static propTypes = {
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-delete'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-delete'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const Cross = React.createClass({
</Base>
);
}
-});
+}
export default Cross;
diff --git a/src/components/common/icons/docs.js b/src/components/common/icons/docs.js
index 87655632f..fbf946a2c 100644
--- a/src/components/common/icons/docs.js
+++ b/src/components/common/icons/docs.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Docs = React.createClass({
- displayName: 'Docs',
- propTypes: {
+class Docs extends React.Component {
+ static displayName = 'Docs';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-docs'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-docs'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -51,6 +52,6 @@ const Docs = React.createClass({
</Base>
);
}
-});
+}
export default Docs;
diff --git a/src/components/common/icons/drag-n-drop.js b/src/components/common/icons/drag-n-drop.js
index 6152137df..46a1b2e4c 100644
--- a/src/components/common/icons/drag-n-drop.js
+++ b/src/components/common/icons/drag-n-drop.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const DragNDrop = React.createClass({
- displayName: 'DragNDrop',
- propTypes: {
+class DragNDrop extends React.Component {
+ static displayName = 'DragNDrop';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-dragndrop'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-dragndrop'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const DragNDrop = React.createClass({
</Base>
);
}
-});
+}
export default DragNDrop;
diff --git a/src/components/common/icons/email.js b/src/components/common/icons/email.js
index b573d5cbe..22f61f181 100644
--- a/src/components/common/icons/email.js
+++ b/src/components/common/icons/email.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Email = React.createClass({
- displayName: 'Email',
- propTypes: {
+class Email extends React.Component {
+ static displayName = 'Email';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-email'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-email'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -43,7 +44,7 @@ const Email = React.createClass({
</Base>
);
}
-});
+}
// this export method must be used for generated documentation to work
export default Email;
diff --git a/src/components/common/icons/expand.js b/src/components/common/icons/expand.js
index ab8c58cf7..31ef4fe64 100644
--- a/src/components/common/icons/expand.js
+++ b/src/components/common/icons/expand.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Expand = React.createClass({
- displayName: 'Expand',
- propTypes: {
+class Expand extends React.Component {
+ static displayName = 'Expand';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-expand'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-expand'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -43,6 +44,6 @@ const Expand = React.createClass({
</Base>
);
}
-});
+}
export default Expand;
diff --git a/src/components/common/icons/eye-seen.js b/src/components/common/icons/eye-seen.js
index 7a7f0b140..86a9ef55b 100644
--- a/src/components/common/icons/eye-seen.js
+++ b/src/components/common/icons/eye-seen.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const EyeSeen = React.createClass({
- displayName: 'EyeSeen',
- propTypes: {
+class EyeSeen extends React.Component {
+ static displayName = 'EyeSeen';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-eyeseen'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-eyeseen'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const EyeSeen = React.createClass({
</Base>
);
}
-});
+}
export default EyeSeen;
diff --git a/src/components/common/icons/eye-unseen.js b/src/components/common/icons/eye-unseen.js
index 2e3a14332..bcf2f8ad0 100644
--- a/src/components/common/icons/eye-unseen.js
+++ b/src/components/common/icons/eye-unseen.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const EyeUnseen = React.createClass({
- displayName: 'EyeUnseen',
- propTypes: {
+class EyeUnseen extends React.Component {
+ static displayName = 'EyeUnseen';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-eyeunseen'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-eyeunseen'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const EyeUnseen = React.createClass({
</Base>
);
}
-});
+}
export default EyeUnseen;
diff --git a/src/components/common/icons/file.js b/src/components/common/icons/file.js
index e0eb0e9bc..4b88a66cc 100644
--- a/src/components/common/icons/file.js
+++ b/src/components/common/icons/file.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const File = React.createClass({
- displayName: 'File',
- propTypes: {
+class File extends React.Component {
+ static displayName = 'File';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-file'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-file'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const File = React.createClass({
</Base>
);
}
-});
+}
export default File;
diff --git a/src/components/common/icons/filter-funnel.js b/src/components/common/icons/filter-funnel.js
index 9c3fa6b27..6820da58b 100644
--- a/src/components/common/icons/filter-funnel.js
+++ b/src/components/common/icons/filter-funnel.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const FilterFunnel = React.createClass({
- displayName: 'FilterFunnel',
- propTypes: {
+class FilterFunnel extends React.Component {
+ static displayName = 'FilterFunnel';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-filterfunnel'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-filterfunnel'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,7 +42,7 @@ const FilterFunnel = React.createClass({
</Base>
);
}
-});
+}
// this export method must be used for generated documentation to work
export default FilterFunnel;
diff --git a/src/components/common/icons/histogram.js b/src/components/common/icons/histogram.js
index b9d69ef9a..9081cd891 100644
--- a/src/components/common/icons/histogram.js
+++ b/src/components/common/icons/histogram.js
@@ -22,17 +22,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Histogram = React.createClass({
- displayName: 'Histogram',
- propTypes: {
+class Histogram extends React.Component {
+ static displayName = 'Histogram';
+
+ static propTypes = {
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-histogram'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-histogram'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -45,6 +46,6 @@ const Histogram = React.createClass({
</Base>
);
}
-});
+}
export default Histogram;
diff --git a/src/components/common/icons/layers.js b/src/components/common/icons/layers.js
index c09bba774..0ac573e7c 100644
--- a/src/components/common/icons/layers.js
+++ b/src/components/common/icons/layers.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Layers = React.createClass({
- displayName: 'Layers',
- propTypes: {
+class Layers extends React.Component {
+ static displayName = 'Layers';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-layers'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-layers'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const Layers = React.createClass({
</Base>
);
}
-});
+}
export default Layers;
diff --git a/src/components/common/icons/legend.js b/src/components/common/icons/legend.js
index c1dc8b6c2..cf0941295 100644
--- a/src/components/common/icons/legend.js
+++ b/src/components/common/icons/legend.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Legend = React.createClass({
- displayName: 'Legend',
- propTypes: {
+class Legend extends React.Component {
+ static displayName = 'Legend';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-legend'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-legend'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const Legend = React.createClass({
</Base>
);
}
-});
+}
export default Legend;
diff --git a/src/components/common/icons/line-chart.js b/src/components/common/icons/line-chart.js
index eb008a7fd..bb90dc89b 100644
--- a/src/components/common/icons/line-chart.js
+++ b/src/components/common/icons/line-chart.js
@@ -22,17 +22,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const LineChart = React.createClass({
- displayName: 'LineChart',
- propTypes: {
+class LineChart extends React.Component {
+ static displayName = 'LineChart';
+
+ static propTypes = {
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-linechart'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-linechart'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -41,6 +42,6 @@ const LineChart = React.createClass({
</Base>
);
}
-});
+}
export default LineChart;
diff --git a/src/components/common/icons/reduce.js b/src/components/common/icons/reduce.js
index c5de589ff..c7852db30 100644
--- a/src/components/common/icons/reduce.js
+++ b/src/components/common/icons/reduce.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Reduce = React.createClass({
- displayName: 'Reduce',
- propTypes: {
+class Reduce extends React.Component {
+ static displayName = 'Reduce';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-reduce'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-reduce'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -46,6 +47,6 @@ const Reduce = React.createClass({
</Base>
);
}
-});
+}
export default Reduce;
diff --git a/src/components/common/icons/save.js b/src/components/common/icons/save.js
index 3c4fcfe52..a5f006521 100644
--- a/src/components/common/icons/save.js
+++ b/src/components/common/icons/save.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Save = React.createClass({
- displayName: 'Save',
- propTypes: {
+class Save extends React.Component {
+ static displayName = 'Save';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-save'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-save'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const Save = React.createClass({
</Base>
);
}
-});
+}
export default Save;
diff --git a/src/components/common/icons/search.js b/src/components/common/icons/search.js
index 46cda403d..b1abfd481 100644
--- a/src/components/common/icons/search.js
+++ b/src/components/common/icons/search.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Search = React.createClass({
- displayName: 'Search',
- propTypes: {
+class Search extends React.Component {
+ static displayName = 'Search';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-search'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-search'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const Search = React.createClass({
</Base>
);
}
-});
+}
export default Search;
diff --git a/src/components/common/icons/settings.js b/src/components/common/icons/settings.js
index f60587c93..f0b208d25 100644
--- a/src/components/common/icons/settings.js
+++ b/src/components/common/icons/settings.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Settings = React.createClass({
- displayName: 'Settings',
- propTypes: {
+class Settings extends React.Component {
+ static displayName = 'Settings';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-settings'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-settings'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -43,6 +44,6 @@ const Settings = React.createClass({
</Base>
);
}
-});
+}
export default Settings;
diff --git a/src/components/common/icons/split.js b/src/components/common/icons/split.js
index feccd2a4f..61760ff85 100644
--- a/src/components/common/icons/split.js
+++ b/src/components/common/icons/split.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Split = React.createClass({
- displayName: 'Split',
- propTypes: {
+class Split extends React.Component {
+ static displayName = 'Split';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-split'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-split'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -61,6 +62,6 @@ const Split = React.createClass({
</Base>
);
}
-});
+}
export default Split;
diff --git a/src/components/common/icons/table.js b/src/components/common/icons/table.js
index 9f290be2f..fafa68eb0 100644
--- a/src/components/common/icons/table.js
+++ b/src/components/common/icons/table.js
@@ -22,17 +22,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Table = React.createClass({
- displayName: 'Table',
- propTypes: {
+class Table extends React.Component {
+ static displayName = 'Table';
+
+ static propTypes = {
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-table'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-table'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -42,6 +43,6 @@ const Table = React.createClass({
</Base>
);
}
-});
+}
export default Table;
diff --git a/src/components/common/icons/trash.js b/src/components/common/icons/trash.js
index d9d9fcc85..27de7545a 100644
--- a/src/components/common/icons/trash.js
+++ b/src/components/common/icons/trash.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const Trash = React.createClass({
- displayName: 'Trash',
- propTypes: {
+class Trash extends React.Component {
+ static displayName = 'Trash';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-trash'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-trash'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -45,6 +46,6 @@ const Trash = React.createClass({
</Base>
);
}
-});
+}
export default Trash;
diff --git a/src/components/common/icons/vert-dots.js b/src/components/common/icons/vert-dots.js
index 0de82411a..60d27720a 100644
--- a/src/components/common/icons/vert-dots.js
+++ b/src/components/common/icons/vert-dots.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from './base';
-const VertDots = React.createClass({
- displayName: 'VertDot',
- propTypes: {
+class VertDots extends React.Component {
+ static displayName = 'VertDot';
+
+ static propTypes = {
/** Set the height of the icon, ex. '16px' */
height: PropTypes.string
- },
- getDefaultProps() {
- return {
- height: '16px',
- predefinedClassName: 'data-ex-icons-vertdot'
- };
- },
+ };
+
+ static defaultProps = {
+ height: '16px',
+ predefinedClassName: 'data-ex-icons-vertdot'
+ };
+
render() {
return (
<Base {...this.props}>
@@ -48,6 +49,6 @@ const VertDots = React.createClass({
</Base>
);
}
-});
+}
export default VertDots;
diff --git a/src/layers/arc-layer/arc-layer-icon.js b/src/layers/arc-layer/arc-layer-icon.js
index 517520637..cdf99ee10 100644
--- a/src/layers/arc-layer/arc-layer-icon.js
+++ b/src/layers/arc-layer/arc-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const ArcLayerIcon = React.createClass({
- displayName: 'ArcLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'point-layer-icon',
- totalColor: 4
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'point-layer-icon',
+ totalColor: 4
+};
+
+class ArcLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -61,6 +62,9 @@ const ArcLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+ArcLayerIcon.displayName = 'ArcLayerIcon';
+ArcLayerIcon.propTypes = propTypes;
+ArcLayerIcon.defaultProps = defaultProps;
export default ArcLayerIcon;
diff --git a/src/layers/cluster-layer/cluster-layer-icon.js b/src/layers/cluster-layer/cluster-layer-icon.js
index 81ce221c3..99e64afcc 100644
--- a/src/layers/cluster-layer/cluster-layer-icon.js
+++ b/src/layers/cluster-layer/cluster-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const ClusterLayerIcon = React.createClass({
- displayName: 'ClusterLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'cluster-layer-icon',
- totalColor: 5
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'cluster-layer-icon',
+ totalColor: 5
+};
+
+class ClusterLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -65,6 +66,10 @@ const ClusterLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+ClusterLayerIcon.displayName = 'ClusterLayerIcon';
+ClusterLayerIcon.propTypes = propTypes;
+ClusterLayerIcon.defaultProps = defaultProps;
export default ClusterLayerIcon;
diff --git a/src/layers/default-layer-icon.js b/src/layers/default-layer-icon.js
index dd0b883e7..1cd98da87 100644
--- a/src/layers/default-layer-icon.js
+++ b/src/layers/default-layer-icon.js
@@ -18,20 +18,21 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const DefaultLayerIcon = React.createClass({
- displayName: 'DefaultLayerIcon',
- propTypes: {
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'default-layer-icon'
- },
+const propTypes = {
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'default-layer-icon'
+};
+
+class DefaultLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -44,6 +45,10 @@ const DefaultLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+DefaultLayerIcon.displayName = 'DefaultLayerIcon';
+DefaultLayerIcon.propTypes = propTypes;
+DefaultLayerIcon.defaultProps = defaultProps;
export default DefaultLayerIcon;
diff --git a/src/layers/geojson-layer/geojson-layer-icon.js b/src/layers/geojson-layer/geojson-layer-icon.js
index de399e283..8eca23ecd 100644
--- a/src/layers/geojson-layer/geojson-layer-icon.js
+++ b/src/layers/geojson-layer/geojson-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const GeojsonLayerIcon = React.createClass({
- displayName: 'GeojsonLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: null,
- size: 'tiny',
- predefinedClassName: 'geojson-layer-icon'
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: null,
+ size: 'tiny',
+ predefinedClassName: 'geojson-layer-icon'
+};
+
+class GeojsonLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -64,6 +65,10 @@ const GeojsonLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+GeojsonLayerIcon.displayName = 'GeojsonLayerIcon',
+GeojsonLayerIcon.propTypes = propTypes;
+GeojsonLayerIcon.defaultProps = defaultProps;
export default GeojsonLayerIcon;
diff --git a/src/layers/grid-layer/grid-layer-icon.js b/src/layers/grid-layer/grid-layer-icon.js
index d293ed3d0..20e36d07d 100644
--- a/src/layers/grid-layer/grid-layer-icon.js
+++ b/src/layers/grid-layer/grid-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const GridLayerIcon = React.createClass({
- displayName: 'GridLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'grid-layer-icon',
- totalColor: 6
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'grid-layer-icon',
+ totalColor: 6
+};
+
+class GridLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -91,6 +92,10 @@ const GridLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+GridLayerIcon.displayName = 'GridLayerIcon';
+GridLayerIcon.propTypes = propTypes;
+GridLayerIcon.defaultProps = defaultProps;
export default GridLayerIcon;
diff --git a/src/layers/heatmap-layer/heatmap-layer-icon.js b/src/layers/heatmap-layer/heatmap-layer-icon.js
index 127da63e8..76a06509a 100644
--- a/src/layers/heatmap-layer/heatmap-layer-icon.js
+++ b/src/layers/heatmap-layer/heatmap-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const HeatmapLayerIcon = React.createClass({
- displayName: 'HeatmapLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'heatmap-layer-icon',
- totalColor: 3
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'heatmap-layer-icon',
+ totalColor: 3
+};
+
+class HeatmapLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -50,6 +51,10 @@ const HeatmapLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+HeatmapLayerIcon.displayName = 'HeatmapLayerIcon';
+HeatmapLayerIcon.propTypes = propTypes;
+HeatmapLayerIcon.defaultProps = defaultProps;
export default HeatmapLayerIcon;
diff --git a/src/layers/hexagon-layer/hexagon-layer-icon.js b/src/layers/hexagon-layer/hexagon-layer-icon.js
index adb666f17..ce919780c 100644
--- a/src/layers/hexagon-layer/hexagon-layer-icon.js
+++ b/src/layers/hexagon-layer/hexagon-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const HexagonLayerIcon = React.createClass({
- displayName: 'HexagonLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'hexagon-layer-icon',
- totalColor: 6
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'hexagon-layer-icon',
+ totalColor: 6
+};
+
+class HexagonLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -73,6 +74,10 @@ const HexagonLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+HexagonLayerIcon.displayName = 'HexagonLayerIcon';
+HexagonLayerIcon.propTypes = propTypes;
+HexagonLayerIcon.defaultProps = defaultProps;
export default HexagonLayerIcon;
diff --git a/src/layers/icon-layer/icon-layer-icon.js b/src/layers/icon-layer/icon-layer-icon.js
index 98b8fd57b..de329bbcd 100644
--- a/src/layers/icon-layer/icon-layer-icon.js
+++ b/src/layers/icon-layer/icon-layer-icon.js
@@ -22,18 +22,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const IconLayerIcon = React.createClass({
- displayName: 'IconLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'icon-layer-icon',
- totalColor: 3
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'icon-layer-icon',
+ totalColor: 3
+};
+
+class IconLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -43,6 +44,10 @@ const IconLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+IconLayerIcon.displayName: 'IconLayerIcon',
+IconLayerIcon.propTypes = propTypes;
+IconLayerIcon.defaultProps = defaultProps;
export default IconLayerIcon;
diff --git a/src/layers/line-layer/line-layer-icon.js b/src/layers/line-layer/line-layer-icon.js
index 23f368f28..641086be1 100644
--- a/src/layers/line-layer/line-layer-icon.js
+++ b/src/layers/line-layer/line-layer-icon.js
@@ -18,22 +18,23 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const LineLayerIcon = React.createClass({
- displayName: 'LineLayerIcon',
- propTypes: {
- /** Set the height of the icon, ex. '16px' */
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'line-layer-icon',
- totalColor: 5
- },
+const propTypes = {
+ /** Set the height of the icon, ex. '16px' */
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'line-layer-icon',
+ totalColor: 5
+};
+
+class LineLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -65,6 +66,10 @@ const LineLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+LineLayerIcon.displayName = 'LineLayerIcon';
+LineLayerIcon.propTypes = propTypes;
+LineLayerIcon.defaultProps = defaultProps;
export default LineLayerIcon;
diff --git a/src/layers/point-layer/point-layer-icon.js b/src/layers/point-layer/point-layer-icon.js
index 6505fc106..1587302bf 100644
--- a/src/layers/point-layer/point-layer-icon.js
+++ b/src/layers/point-layer/point-layer-icon.js
@@ -18,21 +18,22 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Base from 'components/common/icons/base';
-const PointLayerIcon = React.createClass({
- displayName: 'PointLayerIcon',
- propTypes: {
- height: PropTypes.string,
- colors: PropTypes.arrayOf(PropTypes.string)
- },
- defaultProps: {
- height: '16px',
- predefinedClassName: 'point-layer-icon',
- totalColor: 6
- },
+const propTypes = {
+ height: PropTypes.string,
+ colors: PropTypes.arrayOf(PropTypes.string)
+};
+
+const defaultProps = {
+ height: '16px',
+ predefinedClassName: 'point-layer-icon',
+ totalColor: 6
+};
+
+class PointLayerIcon extends Component {
render() {
return (
<Base {...this.props}>
@@ -45,6 +46,10 @@ const PointLayerIcon = React.createClass({
</Base>
);
}
-});
+};
+
+PointLayerIcon.displayName = 'PointLayerIcon';
+PointLayerIcon.propTypes = propTypes;
+PointLayerIcon.defaultProps = defaultProps;
export default PointLayerIcon;