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

70 lines (50 loc) 6.92 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _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; }; 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'); var _colorCodes = require('../../colorCodes'); var _styledComponents = require('styled-components'); 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 CalculatorIcon = function (_Component) { _inherits(CalculatorIcon, _Component); function CalculatorIcon() { _classCallCheck(this, CalculatorIcon); return _possibleConstructorReturn(this, (CalculatorIcon.__proto__ || Object.getPrototypeOf(CalculatorIcon)).apply(this, arguments)); } _createClass(CalculatorIcon, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { x: '0', y: '0', viewBox: '0 0 20 20', width: this.props.width }, _react2.default.createElement( 'g', { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement('path', { d: 'M14.7130093,2.00757576 L5.77805575,2 C4.79521086,2 4,2.68181818 4,3.51515152 L4,17.1515152 C4,17.9848485 4.79521086,18.6666667 5.77805575,18.6666667 L14.7130093,18.6666667 C15.6958542,18.6666667 16.5,17.9848485 16.5,17.1515152 L16.5,3.51515152 C16.5,2.68181818 15.6958542,2.00757576 14.7130093,2.00757576 Z M14.825,6.16666667 L5.65833333,6.16666667 L5.65833333,3.66666667 L14.825,3.66666667 L14.825,6.16666667 Z M6.90833333,10.3333333 L6.90833333,10.3333333 C6.2179774,10.3333333 5.65833333,9.77368927 5.65833333,9.08333333 L5.65833333,9.08333333 C5.65833333,8.3929774 6.2179774,7.83333333 6.90833333,7.83333333 L6.90833333,7.83333333 C7.59868927,7.83333333 8.15833333,8.3929774 8.15833333,9.08333333 L8.15833333,9.08333333 C8.15833333,9.77368927 7.59868927,10.3333333 6.90833333,10.3333333 Z M6.90833333,13.6666667 L6.90833333,13.6666667 C6.2179774,13.6666667 5.65833333,13.1070226 5.65833333,12.4166667 L5.65833333,12.4166667 C5.65833333,11.7263107 6.2179774,11.1666667 6.90833333,11.1666667 L6.90833333,11.1666667 C7.59868927,11.1666667 8.15833333,11.7263107 8.15833333,12.4166667 L8.15833333,12.4166667 C8.15833333,13.1070226 7.59868927,13.6666667 6.90833333,13.6666667 Z M6.90833333,17 L6.90833333,17 C6.2179774,17 5.65833333,16.4403559 5.65833333,15.75 L5.65833333,15.75 C5.65833333,15.0596441 6.2179774,14.5 6.90833333,14.5 L6.90833333,14.5 C7.59868927,14.5 8.15833333,15.0596441 8.15833333,15.75 L8.15833333,15.75 C8.15833333,16.4403559 7.59868927,17 6.90833333,17 Z M10.2416667,10.3333333 L10.2416667,10.3333333 C9.55131073,10.3333333 8.99166667,9.77368927 8.99166667,9.08333333 L8.99166667,9.08333333 C8.99166667,8.3929774 9.55131073,7.83333333 10.2416667,7.83333333 L10.2416667,7.83333333 C10.9320226,7.83333333 11.4916667,8.3929774 11.4916667,9.08333333 L11.4916667,9.08333333 C11.4916667,9.77368927 10.9320226,10.3333333 10.2416667,10.3333333 Z M10.2416667,13.6666667 L10.2416667,13.6666667 C9.55131073,13.6666667 8.99166667,13.1070226 8.99166667,12.4166667 L8.99166667,12.4166667 C8.99166667,11.7263107 9.55131073,11.1666667 10.2416667,11.1666667 L10.2416667,11.1666667 C10.9320226,11.1666667 11.4916667,11.7263107 11.4916667,12.4166667 L11.4916667,12.4166667 C11.4916667,13.1070226 10.9320226,13.6666667 10.2416667,13.6666667 Z M10.2416667,17 L10.2416667,17 C9.55131073,17 8.99166667,16.4403559 8.99166667,15.75 L8.99166667,15.75 C8.99166667,15.0596441 9.55131073,14.5 10.2416667,14.5 L10.2416667,14.5 C10.9320226,14.5 11.4916667,15.0596441 11.4916667,15.75 L11.4916667,15.75 C11.4916667,16.4403559 10.9320226,17 10.2416667,17 Z M13.575,10.3333333 L13.575,10.3333333 C12.8846441,10.3333333 12.325,9.77368927 12.325,9.08333333 L12.325,9.08333333 C12.325,8.3929774 12.8846441,7.83333333 13.575,7.83333333 L13.575,7.83333333 C14.2653559,7.83333333 14.825,8.3929774 14.825,9.08333333 L14.825,9.08333333 C14.825,9.77368927 14.2653559,10.3333333 13.575,10.3333333 Z M13.575,13.6666667 L13.575,13.6666667 C12.8846441,13.6666667 12.325,13.1070226 12.325,12.4166667 L12.325,12.4166667 C12.325,11.7263107 12.8846441,11.1666667 13.575,11.1666667 L13.575,11.1666667 C14.2653559,11.1666667 14.825,11.7263107 14.825,12.4166667 L14.825,12.4166667 C14.825,13.1070226 14.2653559,13.6666667 13.575,13.6666667 Z M13.575,17 L13.575,17 C12.8846441,17 12.325,16.4403559 12.325,15.75 L12.325,15.75 C12.325,15.0596441 12.8846441,14.5 13.575,14.5 L13.575,14.5 C14.2653559,14.5 14.825,15.0596441 14.825,15.75 L14.825,15.75 C14.825,16.4403559 14.2653559,17 13.575,17 Z', id: 'Combined-Shape', fill: this.props.theme.accent.primary, fillRule: 'nonzero' }) ) ); } }]); return CalculatorIcon; }(_react.Component); CalculatorIcon.propTypes = { width: _propTypes.PropTypes.string }; CalculatorIcon.defaultProps = { width: '20px', theme: _extends({}, _colorCodes.guidelineColors) }; exports.default = (0, _styledComponents.withTheme)(CalculatorIcon);