diff --git a/.babelrc.js b/.babelrc.js
index 42912edf6..beb9e1f9a 100644
--- a/.babelrc.js
+++ b/.babelrc.js
@@ -4,7 +4,6 @@ const isTest = process.env.TYPE === 'test';
const plugins = [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
- isDevelopment ? 'react-hot-loader/babel' : '',
isTest ? 'istanbul' : '',
].filter(Boolean);
diff --git a/config/dev.js b/config/dev.js
index eee5137ae..d567db154 100644
--- a/config/dev.js
+++ b/config/dev.js
@@ -14,8 +14,6 @@ module.exports = merge(commonConfig, {
entry: [
'@babel/polyfill',
resolve(__dirname, './polyfill'),
- // activate HMR for React (needs to be before everything except polyfills)
- 'react-hot-loader/patch',
// bundle the client for webpack-dev-server and connect to the provided endpoint
`webpack-dev-server/client?http://${HOST}:${PORT}`,
// bundle the client for hot reloading, only- means to only hot reload for successful updates
diff --git a/docs/examples/AccordionExample.jsx b/docs/examples/AccordionExample.jsx
index 9114e4ac3..6c0afd7b1 100644
--- a/docs/examples/AccordionExample.jsx
+++ b/docs/examples/AccordionExample.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
-import { Accordion, Checkbox, Panel } from '../../src';
+import { Accordion, Checkbox } from '../../src';
class AccordionExample extends React.Component {
state = {
@@ -74,7 +74,8 @@ const exampleProps = {
areas of the list.
),
- exampleCodeSnippet: `
+ exampleCodeSnippet: `
+
-
@@ -98,7 +99,8 @@ const exampleProps = {
- `,
+
+ `,
propTypeSectionArray: [
{
propTypes: [
@@ -134,7 +136,8 @@ const exampleProps = {
type: 'node',
note: (
- Panel(s) to be rendered inside the Accordion. See Accordion.Panels
+ Accept an array of {``} or{' '}
+ {``}
),
},
diff --git a/docs/examples/AccordionPanelExample.jsx b/docs/examples/AccordionPanelExample.jsx
index 091d13c32..10b0c6b00 100644
--- a/docs/examples/AccordionPanelExample.jsx
+++ b/docs/examples/AccordionPanelExample.jsx
@@ -22,7 +22,7 @@ const exampleProps = {
componentName: 'Accordion.Panel',
designNotes: (
- See Panel
+ This component is equivalent to Panel
),
exampleCodeSnippet: ` {
ReactDOM.render(
-
-
-
-
- ,
+
+
+ ,
document.getElementById('app')
);
};
renderApp();
-
-if (module.hot) {
- module.hot.accept('./components/Layout', renderApp);
-}
diff --git a/package-lock.json b/package-lock.json
index aaff30c89..b437e6e64 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3958,12 +3958,6 @@
}
}
},
- "dom-walk": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz",
- "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=",
- "dev": true
- },
"domain-browser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
@@ -6322,24 +6316,6 @@
}
}
},
- "global": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
- "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=",
- "dev": true,
- "requires": {
- "min-document": "2.19.0",
- "process": "0.5.2"
- },
- "dependencies": {
- "process": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
- "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=",
- "dev": true
- }
- }
- },
"global-dirs": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz",
@@ -6674,12 +6650,6 @@
"integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=",
"dev": true
},
- "hoist-non-react-statics": {
- "version": "2.5.5",
- "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
- "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==",
- "dev": true
- },
"hosted-git-info": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
@@ -9376,15 +9346,6 @@
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"dev": true
},
- "min-document": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
- "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=",
- "dev": true,
- "requires": {
- "dom-walk": "0.1.1"
- }
- },
"minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
@@ -13462,31 +13423,6 @@
"scheduler": "0.11.3"
}
},
- "react-hot-loader": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.6.2.tgz",
- "integrity": "sha512-9XxH/t9jblu4vUDgxHcMLwvm4aOhaoxazzTP9vwjTVzOgU987T4rDYA85XrlmbDan9WkD+h/iVHOK8F8UnQsDg==",
- "dev": true,
- "requires": {
- "fast-levenshtein": "2.0.6",
- "global": "4.3.2",
- "hoist-non-react-statics": "2.5.5",
- "loader-utils": "1.1.0",
- "lodash.merge": "4.6.1",
- "prop-types": "15.6.2",
- "react-lifecycles-compat": "3.0.4",
- "shallowequal": "1.1.0",
- "source-map": "0.7.3"
- },
- "dependencies": {
- "source-map": {
- "version": "0.7.3",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
- "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
- "dev": true
- }
- }
- },
"react-input-autosize": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.1.tgz",
@@ -14701,12 +14637,6 @@
}
}
},
- "shallowequal": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
- "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
- "dev": true
- },
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
diff --git a/package.json b/package.json
index bcc2cd68f..09f2c9fdc 100644
--- a/package.json
+++ b/package.json
@@ -121,7 +121,6 @@
"puppeteer": "^1.11.0",
"react-bootstrap": "^0.31.5",
"react-datepicker": "github:Adslot/react-datepicker#6f912842e7dcec6a6e8ff43fd0e3e79af84a8ba6",
- "react-hot-loader": "^4.3.12",
"react-redux": "^5.0.6",
"react-select": "^1.2.1",
"react-syntax-highlighter": "^7.0.0",
diff --git a/src/components/adslot-ui/Accordion/AccordionPanel/index.jsx b/src/components/adslot-ui/Accordion/AccordionPanel/index.jsx
deleted file mode 100644
index 8764f2ec9..000000000
--- a/src/components/adslot-ui/Accordion/AccordionPanel/index.jsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import Panel from '../../Panel';
-
-class AccordionPanel extends Panel {
- static displayName = 'Accordion.Panel';
-}
-
-export default AccordionPanel;
diff --git a/src/components/adslot-ui/Accordion/index.jsx b/src/components/adslot-ui/Accordion/index.jsx
index 5104c5a58..1c067fd9a 100644
--- a/src/components/adslot-ui/Accordion/index.jsx
+++ b/src/components/adslot-ui/Accordion/index.jsx
@@ -2,9 +2,9 @@ import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import Card from 'alexandria/Card';
-import AccordionPanel from './AccordionPanel';
+import Panel from '../Panel';
-class AccordionComponent extends React.PureComponent {
+class Accordion extends React.PureComponent {
static propTypes = {
dts: PropTypes.string,
onPanelClick: PropTypes.func,
@@ -63,7 +63,7 @@ class AccordionComponent extends React.PureComponent {
const { id, isCollapsed } = child.props;
// prevent rendering if child is not an instance of Accordion.Panel
- if (child.type.displayName !== AccordionPanel.displayName) {
+ if (child.type !== Panel) {
return null;
}
@@ -87,6 +87,6 @@ class AccordionComponent extends React.PureComponent {
}
}
-AccordionComponent.Panel = AccordionPanel;
+Accordion.Panel = Panel;
-export default AccordionComponent;
+export default Accordion;