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

64 lines (47 loc) 6.08 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 FAssuredBase = function (_Component) { _inherits(FAssuredBase, _Component); function FAssuredBase() { _classCallCheck(this, FAssuredBase); return _possibleConstructorReturn(this, (FAssuredBase.__proto__ || Object.getPrototypeOf(FAssuredBase)).apply(this, arguments)); } _createClass(FAssuredBase, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { viewBox: '0 0 20 20', width: this.props.width }, _react2.default.createElement( 'g', { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement('polygon', { id: 'Shape', points: '0 0 20 0 20 20 0 20' }), _react2.default.createElement('path', { d: 'M5,10.8333333 L5,13.614013 C4.62114359,13.4340379 4.19733221,13.3333333 3.75,13.3333333 C2.93387993,13.3333333 2.19604876,13.668528 1.66666667,14.2087572 L1.66666667,2.5 C1.66666667,2.03976271 2.03976271,1.66666667 2.5,1.66666667 L4.16666667,1.66666667 C4.62690396,1.66666667 5,2.03976271 5,2.5 L5,3.33333333 L2.5,3.33333333 L2.5,4.16666667 L5,4.16666667 L5,5 L3.33333333,5 L3.33333333,5.83333333 L5,5.83333333 L5,6.66666667 L3.33333333,6.66666667 L3.33333333,7.5 L5,7.5 L5,8.33333333 L3.33333333,8.33333333 L3.33333333,9.16666667 L5,9.16666667 L5,10 L3.33333333,10 L3.33333333,10.8333333 L5,10.8333333 Z M13.3333333,15 L13.3333333,16.6666667 L14.1666667,16.6666667 L14.1666667,15 L15.8333333,15 L15.8333333,16.6666667 L16.6666667,16.6666667 L16.6666667,15 L17.5,15 C17.9602373,15 18.3333333,15.373096 18.3333333,15.8333333 L18.3333333,17.5 C18.3333333,17.9602373 17.9602373,18.3333333 17.5,18.3333333 L5.79124281,18.3333333 C6.331472,17.8039512 6.66666667,17.0661201 6.66666667,16.25 C6.66666667,15.8026678 6.56596206,15.3788564 6.38598702,15 L8.33333333,15 L8.33333333,16.6666667 L9.16666667,16.6666667 L9.16666667,15 L10.8333333,15 L10.8333333,16.6666667 L11.6666667,16.6666667 L11.6666667,15 L13.3333333,15 Z M3.75,18.3333333 C2.59940677,18.3333333 1.66666667,17.4005932 1.66666667,16.25 C1.66666667,15.0994068 2.59940677,14.1666667 3.75,14.1666667 C4.90059323,14.1666667 5.83333333,15.0994068 5.83333333,16.25 C5.83333333,17.4005932 4.90059323,18.3333333 3.75,18.3333333 Z M9.84192795,6.69161677 C9.44415348,6.69161677 9.13616702,6.83743478 8.91795931,7.12907518 C8.69975161,7.42071559 8.59064939,7.82712092 8.59064939,8.34830339 C8.59064939,9.43280649 9.00773807,9.9750499 9.84192795,9.9750499 C10.1919695,9.9750499 10.615877,9.88966597 11.1136634,9.71889554 L11.1136634,10.5838323 C10.7045239,10.7501672 10.2476584,10.8333333 9.74305307,10.8333333 C9.01796705,10.8333333 8.46336412,10.6187646 8.07922764,10.1896208 C7.69509116,9.7604769 7.5030258,9.14449281 7.5030258,8.34165003 C7.5030258,7.83599215 7.59735376,7.3929937 7.7860125,7.01264138 C7.97467125,6.63228907 8.24572206,6.34065304 8.59917309,6.13772455 C8.95262411,5.93479606 9.36687159,5.83333333 9.84192795,5.83333333 C10.3260763,5.83333333 10.8124903,5.9475482 11.3011847,6.17598137 L10.9602368,7.01430472 C10.7738511,6.92781061 10.5863317,6.85240662 10.3976729,6.78809049 C10.2090142,6.72377435 10.0237677,6.69161677 9.84192795,6.69161677 Z M14.2844782,10.7667997 L13.0843419,6.9510978 L13.0536566,6.9510978 C13.0968435,7.72732701 13.1184366,8.24517502 13.1184366,8.50465735 L13.1184366,10.7667997 L12.1740111,10.7667997 L12.1740111,5.90319361 L13.612811,5.90319361 L14.7924905,9.62242182 L14.8129474,9.62242182 L16.0642259,5.90319361 L17.5030258,5.90319361 L17.5030258,10.7667997 L16.5176866,10.7667997 L16.5176866,8.46473719 C16.5176866,8.3560651 16.5193913,8.23076141 16.5228008,8.08882236 C16.5262103,7.9468833 16.5415528,7.56986334 16.5688287,6.95775116 L16.5381434,6.95775116 L15.2527701,10.7667997 L14.2844782,10.7667997 Z', id: 'Combined-Shape', fill: this.props.color }) ) ); } }]); return FAssuredBase; }(_react.Component); FAssuredBase.propTypes = { width: _propTypes.PropTypes.string, color: _propTypes.PropTypes.string.isRequired }; FAssuredBase.defaultProps = { width: '' }; exports.default = FAssuredBase;