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

80 lines (60 loc) 4.46 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 NoPlasticIcon = function (_Component) { _inherits(NoPlasticIcon, _Component); function NoPlasticIcon() { _classCallCheck(this, NoPlasticIcon); return _possibleConstructorReturn(this, (NoPlasticIcon.__proto__ || Object.getPrototypeOf(NoPlasticIcon)).apply(this, arguments)); } _createClass(NoPlasticIcon, [{ key: 'render', value: function render() { return _react2.default.createElement( 'svg', { width: this.props.width, viewBox: '0 0 25 25', version: '1.1' }, _react2.default.createElement( 'g', { id: 'Icons/No-plastic', stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, _react2.default.createElement( 'g', { id: 'ic_undo_black_24px' }, _react2.default.createElement('polygon', { id: 'Shape', points: '0 0 25 0 25 25 0 25' }) ), _react2.default.createElement('path', { d: 'M5.75806039,3 L9.38757489,3 L9.38757489,5.66317826 C9.38757489,6.72444896 10.2479048,7.58477885 11.3091755,7.58477885 L13.8169013,7.58546854 C14.878172,7.58546854 15.7385019,6.72513865 15.7385019,5.66386795 C15.7385019,5.66363801 15.7385018,5.66340807 15.7385018,5.66317814 L15.7368561,3 L19.3677533,3 L19.3677533,17.489007 L5.75806039,3.7226037 L5.75806039,3 Z M1.89928071,5.10025144 L3.19004009,3.82598333 L21.1007193,21.7389898 L19.8175851,23.022124 L17.2493844,20.4539232 L7.66874213,20.3997711 C6.61596149,20.3938206 5.76398396,19.541843 5.7580334,18.4890624 L5.70388134,8.90842016 L1.89928071,5.10025144 Z', id: 'Combined-Shape', fill: this.props.theme.states.error }) ) ); } }]); return NoPlasticIcon; }(_react.Component); NoPlasticIcon.propTypes = { width: _propTypes.PropTypes.string }; NoPlasticIcon.defaultProps = { width: '20px', theme: _extends({}, _colorCodes.guidelineColors) }; exports.default = (0, _styledComponents.withTheme)(NoPlasticIcon);