UNPKG

fk-react-ui-components

Version:

Step 1 : Create a file in [ Seeds / Plants / Trees ] <br> Step 2 : It should export an Object with component name and story Component [Refer other components] <br> Step 3 : Story Component should return a react component <br> Step 3 : Created file should

74 lines (57 loc) 4.03 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _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; }; }(); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _propTypes = require('prop-types'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _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; } function _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; } var ServiceIcon = function (_Component) { _inherits(ServiceIcon, _Component); function ServiceIcon() { _classCallCheck(this, ServiceIcon); return _possibleConstructorReturn(this, (ServiceIcon.__proto__ || Object.getPrototypeOf(ServiceIcon)).apply(this, arguments)); } _createClass(ServiceIcon, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { x: '0', y: '0', viewBox: '0 0 25 25', width: this.props.width }, _react2.default.createElement( 'g', { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement( 'g', { id: 'ic_build_black_24px', transform: 'translate(-0.500000, -0.500000)' }, _react2.default.createElement('polygon', { id: 'Shape', points: '0.5 0.5 25.5 0.5 25.5 25.5 0.5 25.5' }), _react2.default.createElement('path', { d: 'M21.7642714,18.7123526 L14.3299402,11.2329547 C15.0652037,9.34255742 14.656724,7.12339541 13.104501,5.56176288 C11.4705821,3.91793917 9.01970364,3.58917443 7.0590009,4.49327747 L10.5719266,8.02749845 L8.12104822,10.493234 L4.52642654,6.95901304 C3.54607518,8.93160149 3.95455491,11.3973371 5.58847386,13.0411608 C7.14069685,14.6027933 9.34648742,15.0137492 11.2254942,14.2740286 L18.6598254,21.7534264 C18.9866092,22.0821912 19.4767849,22.0821912 19.8035687,21.7534264 L21.6825754,19.8630292 C22.0910552,19.5342644 22.0910552,18.9589261 21.7642714,18.7123526 Z', id: 'Shape', fill: '#BBBBBB', fillRule: 'nonzero' }) ) ) ); } }]); return ServiceIcon; }(_react.Component); ServiceIcon.propTypes = { width: _propTypes.PropTypes.string }; ServiceIcon.defaultProps = { width: '20px' }; exports.default = ServiceIcon;