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

62 lines (45 loc) 3.31 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 GiftBoxIcon = function (_Component) { _inherits(GiftBoxIcon, _Component); function GiftBoxIcon() { _classCallCheck(this, GiftBoxIcon); return _possibleConstructorReturn(this, (GiftBoxIcon.__proto__ || Object.getPrototypeOf(GiftBoxIcon)).apply(this, arguments)); } _createClass(GiftBoxIcon, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { viewBox: '0 0 16 16', width: this.props.width }, _react2.default.createElement( 'g', { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement('path', { d: 'M2.8,8.05714286 L7.6,8.05714286 L7.6,14 L2.8,14 L2.8,8.05714286 Z M2,4.9 L7.6,4.9 L7.6,7.31428571 L2,7.31428571 L2,4.9 Z M8.4,4.9 L14,4.9 L14,7.31428571 L8.4,7.31428571 L8.4,4.9 Z M8.4,8.05714286 L13.2,8.05714286 L13.2,14 L8.4,14 L8.4,8.05714286 Z M4.4,1 L7.6,4.15714286 L4.6,4.15714286 L2.8,2.48571429 L4.4,2.48571429 L4.4,1 Z M11.6,1 L11.6,2.48571429 L13.2,2.48571429 L11.4,4.15714286 L8.4,4.15714286 L11.6,1 Z', id: 'path-1', fill: '#A142F4' }) ) ); } }]); return GiftBoxIcon; }(_react.Component); GiftBoxIcon.propTypes = { width: _propTypes.PropTypes.string }; GiftBoxIcon.defaultProps = { width: '20px' }; exports.default = GiftBoxIcon;