From 09538c403c7437eecad2122f527addcbfc83a1c9 Mon Sep 17 00:00:00 2001 From: afeiship <1290657123@qq.com> Date: Thu, 25 Jan 2018 20:55:27 +0800 Subject: [PATCH] issue: pure=>comp --- dist/react-status-manager.js | 2 +- dist/react-status-manager.js.map | 2 +- src/components/react-status-manager.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/react-status-manager.js b/dist/react-status-manager.js index 5121224..4097ecc 100644 --- a/dist/react-status-manager.js +++ b/dist/react-status-manager.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("classnames"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","classnames","prop-types"],t):"object"==typeof exports?exports.ReactStatusManager=t(require("react"),require("classnames"),require("prop-types")):e.ReactStatusManager=t(e.react,e.classnames,e["prop-types"])}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=n(o);t.default=a.default},function(t,r){t.exports=e},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=Object.assign||function(e){for(var t=1;t= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar _default = function (_PureComponent) {\n\t _inherits(_default, _PureComponent);\n\t\n\t function _default() {\n\t _classCallCheck(this, _default);\n\t\n\t return _possibleConstructorReturn(this, (_default.__proto__ || Object.getPrototypeOf(_default)).apply(this, arguments));\n\t }\n\t\n\t _createClass(_default, [{\n\t key: 'render',\n\t\n\t /*===properties end===*/\n\t\n\t /*===properties start===*/\n\t value: function render() {\n\t var _props = this.props,\n\t className = _props.className,\n\t status = _props.status,\n\t statusList = _props.statusList,\n\t size = _props.size,\n\t children = _props.children,\n\t props = _objectWithoutProperties(_props, ['className', 'status', 'statusList', 'size', 'children']);\n\t\n\t return React.createElement(\n\t 'div',\n\t _extends({\n\t className: (0, _classnames2.default)('react-status-manager', className),\n\t 'data-status': status\n\t }, props),\n\t children.map(function (child, index) {\n\t return status === statusList[index] && child;\n\t })\n\t );\n\t }\n\t }]);\n\t\n\t return _default;\n\t}(_react.PureComponent);\n\t\n\t_default.propTypes = {\n\t className: _propTypes2.default.string,\n\t statusList: _propTypes2.default.array,\n\t status: _propTypes2.default.any\n\t};\n\t_default.defaultProps = {\n\t statusList: []\n\t};\n\texports.default = _default;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// react-status-manager.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2f325eff57a331e71130","import ReactStatusManager from 'components/react-status-manager';\nexport default ReactStatusManager;\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","import {PureComponent, createElement} from 'react';\n\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class extends PureComponent{\n /*===properties start===*/\n static propTypes = {\n className:PropTypes.string,\n statusList:PropTypes.array,\n status:PropTypes.any\n };\n\n static defaultProps = {\n statusList:[]\n };\n /*===properties end===*/\n\n render(){\n const { className, status, statusList, size ,children,...props} = this.props;\n return (\n \n {\n children.map((child,index)=>{\n return status === statusList[index] && child;\n })\n }\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/react-status-manager.js","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"classnames\"\n// module id = 3\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 4\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///react-status-manager.js","webpack:///webpack/bootstrap a61cb1fc1e4d64309504","webpack:///./src/main.js","webpack:///external \"react\"","webpack:///./src/components/react-status-manager.js","webpack:///external \"classnames\"","webpack:///external \"prop-types\""],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_3__","__WEBPACK_EXTERNAL_MODULE_4__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_reactStatusManager","_reactStatusManager2","React","_objectWithoutProperties","keys","target","i","indexOf","prototype","hasOwnProperty","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","undefined","_extends","assign","arguments","length","source","key","_createClass","defineProperties","props","descriptor","protoProps","staticProps","_react","_propTypes","_propTypes2","_classnames","_classnames2","_default","_Component","getPrototypeOf","apply","_props","className","status","statusList","children","size","createElement","data-status","map","child","index","Component","propTypes","string","array","any","defaultProps"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,eACA,kBAAAC,gBAAAC,IACAD,QAAA,mCAAAJ,GACA,gBAAAC,SACAA,QAAA,mBAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,eAEAJ,EAAA,mBAAAC,EAAAD,EAAA,MAAAA,EAAA,WAAAA,EAAA,gBACCO,KAAA,SAAAC,EAAAC,EAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAX,OAGA,IAAAC,GAAAW,EAAAD,IACAX,WACAa,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAa,QAAA,EAGAb,EAAAD,QAvBA,GAAAY,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,IAGAR,EAAA,KDgBM,SAAST,EAAQD,EAASU,GAE/B,YAUA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GARvFG,OAAOC,eAAexB,EAAS,cAC7ByB,OAAO,GE3DV,IAAAC,GAAAhB,EAAA,GFgEKiB,EAAuBR,EAAu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B,EI/IQoB,cACLb,eJiJH9E,EAAQsB,QAAUiD,IACWxD,KAAKf,EAASU,EAAoB,KAI1D,SAAST,EAAQD,GKpKvBC,EAAAD,QAAAO,GL0KM,SAASN,EAAQD,GM1KvBC,EAAAD,QAAAQ","file":"react-status-manager.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"classnames\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"classnames\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactStatusManager\"] = factory(require(\"react\"), require(\"classnames\"), require(\"prop-types\"));\n\telse\n\t\troot[\"ReactStatusManager\"] = factory(root[\"react\"], root[\"classnames\"], root[\"prop-types\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"classnames\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"classnames\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactStatusManager\"] = factory(require(\"react\"), require(\"classnames\"), require(\"prop-types\"));\n\telse\n\t\troot[\"ReactStatusManager\"] = factory(root[\"react\"], root[\"classnames\"], root[\"prop-types\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _reactStatusManager = __webpack_require__(2);\n\t\n\tvar _reactStatusManager2 = _interopRequireDefault(_reactStatusManager);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\texports.default = _reactStatusManager2.default;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(React) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = undefined;\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _propTypes = __webpack_require__(4);\n\t\n\tvar _propTypes2 = _interopRequireDefault(_propTypes);\n\t\n\tvar _classnames = __webpack_require__(3);\n\t\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar _default = function (_Component) {\n\t _inherits(_default, _Component);\n\t\n\t function _default() {\n\t _classCallCheck(this, _default);\n\t\n\t return _possibleConstructorReturn(this, (_default.__proto__ || Object.getPrototypeOf(_default)).apply(this, arguments));\n\t }\n\t\n\t _createClass(_default, [{\n\t key: 'render',\n\t\n\t /*===properties end===*/\n\t\n\t /*===properties start===*/\n\t value: function render() {\n\t var _props = this.props,\n\t className = _props.className,\n\t status = _props.status,\n\t statusList = _props.statusList,\n\t size = _props.size,\n\t children = _props.children,\n\t props = _objectWithoutProperties(_props, ['className', 'status', 'statusList', 'size', 'children']);\n\t\n\t return React.createElement(\n\t 'div',\n\t _extends({\n\t className: (0, _classnames2.default)('react-status-manager', className),\n\t 'data-status': status\n\t }, props),\n\t children.map(function (child, index) {\n\t return status === statusList[index] && child;\n\t })\n\t );\n\t }\n\t }]);\n\t\n\t return _default;\n\t}(_react.Component);\n\t\n\t_default.propTypes = {\n\t className: _propTypes2.default.string,\n\t statusList: _propTypes2.default.array,\n\t status: _propTypes2.default.any\n\t};\n\t_default.defaultProps = {\n\t statusList: []\n\t};\n\texports.default = _default;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// react-status-manager.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a61cb1fc1e4d64309504","import ReactStatusManager from 'components/react-status-manager';\nexport default ReactStatusManager;\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","import { Component, createElement } from 'react';\n\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class extends Component{\n /*===properties start===*/\n static propTypes = {\n className:PropTypes.string,\n statusList:PropTypes.array,\n status:PropTypes.any\n };\n\n static defaultProps = {\n statusList:[]\n };\n /*===properties end===*/\n\n render(){\n const { className, status, statusList, size ,children,...props} = this.props;\n return (\n \n {\n children.map((child,index)=>{\n return status === statusList[index] && child;\n })\n }\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/react-status-manager.js","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"classnames\"\n// module id = 3\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 4\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/react-status-manager.js b/src/components/react-status-manager.js index cac6c6f..52a9f4f 100644 --- a/src/components/react-status-manager.js +++ b/src/components/react-status-manager.js @@ -1,9 +1,9 @@ -import {PureComponent, createElement} from 'react'; +import { Component, createElement } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -export default class extends PureComponent{ +export default class extends Component{ /*===properties start===*/ static propTypes = { className:PropTypes.string,