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

93 lines (76 loc) 7.94 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 CalendarIcon = function (_Component) { _inherits(CalendarIcon, _Component); function CalendarIcon() { _classCallCheck(this, CalendarIcon); return _possibleConstructorReturn(this, (CalendarIcon.__proto__ || Object.getPrototypeOf(CalendarIcon)).apply(this, arguments)); } _createClass(CalendarIcon, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { x: '0', y: '0', viewBox: '0 0 100 80', width: this.props.width }, _react2.default.createElement( 'desc', null, 'Created with Sketch.' ), _react2.default.createElement('defs', null), _react2.default.createElement( 'g', { id: 'Stage-2', stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement( 'g', { id: 'calendar-(3)', transform: 'translate(27.000000, 25.000000)' }, _react2.default.createElement('path', { d: 'M45.1785714,3.28571429 L39.4285714,3.28571429 L39.4285714,0.821428571 C39.4285714,0.367178571 39.0613929,0 38.6071429,0 L32.8571429,0 C32.4028929,0 32.0357143,0.367178571 32.0357143,0.821428571 L32.0357143,3.28571429 L13.9642857,3.28571429 L13.9642857,0.821428571 C13.9642857,0.367178571 13.5971071,0 13.1428571,0 L7.39285714,0 C6.93860714,0 6.57142857,0.367178571 6.57142857,0.821428571 L6.57142857,3.28571429 L0.821428571,3.28571429 C0.367178571,3.28571429 0,3.65289286 0,4.10714286 L0,13.1428571 L0,48.4642857 C0,48.9185357 0.367178571,49.2857143 0.821428571,49.2857143 L45.1785714,49.2857143 C45.6328214,49.2857143 46,48.9185357 46,48.4642857 L46,13.1428571 L46,4.10714286 C46,3.65289286 45.6328214,3.28571429 45.1785714,3.28571429 Z M33.6785714,1.64285714 L37.7857143,1.64285714 L37.7857143,4.10714286 L37.7857143,6.57142857 L33.6785714,6.57142857 L33.6785714,4.10714286 L33.6785714,1.64285714 Z M8.21428571,1.64285714 L12.3214286,1.64285714 L12.3214286,4.10714286 L12.3214286,6.57142857 L8.21428571,6.57142857 L8.21428571,4.10714286 L8.21428571,1.64285714 Z M1.64285714,4.92857143 L6.57142857,4.92857143 L6.57142857,7.39285714 C6.57142857,7.84710714 6.93860714,8.21428571 7.39285714,8.21428571 L13.1428571,8.21428571 C13.5971071,8.21428571 13.9642857,7.84710714 13.9642857,7.39285714 L13.9642857,4.92857143 L32.0357143,4.92857143 L32.0357143,7.39285714 C32.0357143,7.84710714 32.4028929,8.21428571 32.8571429,8.21428571 L38.6071429,8.21428571 C39.0613929,8.21428571 39.4285714,7.84710714 39.4285714,7.39285714 L39.4285714,4.92857143 L44.3571429,4.92857143 L44.3571429,12.3214286 L1.64285714,12.3214286 L1.64285714,4.92857143 Z M1.64285714,47.6428571 L1.64285714,13.9642857 L44.3571429,13.9642857 L44.3571429,47.6428571 L1.64285714,47.6428571 Z', id: 'Shape', fill: '#2AA7E2', fillRule: 'nonzero' }), _react2.default.createElement('path', { d: 'M29.5714286,18.8928571 L23.8214286,18.8928571 L22.1785714,18.8928571 L16.4285714,18.8928571 L14.7857143,18.8928571 L7.39285714,18.8928571 L7.39285714,26.2857143 L7.39285714,27.9285714 L7.39285714,33.6785714 L7.39285714,35.3214286 L7.39285714,42.7142857 L14.7857143,42.7142857 L16.4285714,42.7142857 L22.1785714,42.7142857 L23.8214286,42.7142857 L29.5714286,42.7142857 L31.2142857,42.7142857 L38.6071429,42.7142857 L38.6071429,35.3214286 L38.6071429,33.6785714 L38.6071429,27.9285714 L38.6071429,26.2857143 L38.6071429,18.8928571 L31.2142857,18.8928571 L29.5714286,18.8928571 Z M23.8214286,20.5357143 L29.5714286,20.5357143 L29.5714286,26.2857143 L23.8214286,26.2857143 L23.8214286,20.5357143 Z M29.5714286,33.6785714 L23.8214286,33.6785714 L23.8214286,27.9285714 L29.5714286,27.9285714 L29.5714286,33.6785714 Z M16.4285714,27.9285714 L22.1785714,27.9285714 L22.1785714,33.6785714 L16.4285714,33.6785714 L16.4285714,27.9285714 Z M16.4285714,20.5357143 L22.1785714,20.5357143 L22.1785714,26.2857143 L16.4285714,26.2857143 L16.4285714,20.5357143 Z M9.03571429,20.5357143 L14.7857143,20.5357143 L14.7857143,26.2857143 L9.03571429,26.2857143 L9.03571429,20.5357143 Z M9.03571429,27.9285714 L14.7857143,27.9285714 L14.7857143,33.6785714 L9.03571429,33.6785714 L9.03571429,27.9285714 Z M14.7857143,41.0714286 L9.03571429,41.0714286 L9.03571429,35.3214286 L14.7857143,35.3214286 L14.7857143,41.0714286 Z M22.1785714,41.0714286 L16.4285714,41.0714286 L16.4285714,35.3214286 L22.1785714,35.3214286 L22.1785714,41.0714286 Z M29.5714286,41.0714286 L23.8214286,41.0714286 L23.8214286,35.3214286 L29.5714286,35.3214286 L29.5714286,41.0714286 Z M36.9642857,41.0714286 L31.2142857,41.0714286 L31.2142857,35.3214286 L36.9642857,35.3214286 L36.9642857,41.0714286 Z M36.9642857,33.6785714 L31.2142857,33.6785714 L31.2142857,27.9285714 L36.9642857,27.9285714 L36.9642857,33.6785714 Z M36.9642857,20.5357143 L36.9642857,26.2857143 L31.2142857,26.2857143 L31.2142857,20.5357143 L36.9642857,20.5357143 Z', id: 'Shape', fill: '#2AA7E2', fillRule: 'nonzero' }), _react2.default.createElement('polygon', { id: 'Path', fill: '#FFE600', points: '29.5714286 33.6785714 23.8214286 33.6785714 23.8214286 27.9285714 29.5714286 27.9285714' }) ) ) ); } }]); return CalendarIcon; }(_react.Component); CalendarIcon.propTypes = { width: _propTypes.PropTypes.string }; CalendarIcon.defaultProps = { width: '20px' }; exports.default = CalendarIcon;