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

76 lines (56 loc) 4.49 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 ThumbsDownIcon = function (_Component) { _inherits(ThumbsDownIcon, _Component); function ThumbsDownIcon() { _classCallCheck(this, ThumbsDownIcon); return _possibleConstructorReturn(this, (ThumbsDownIcon.__proto__ || Object.getPrototypeOf(ThumbsDownIcon)).apply(this, arguments)); } _createClass(ThumbsDownIcon, [{ 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( 'g', { id: 'ic_thumb_up_black_24px' }, _react2.default.createElement('polygon', { id: 'Shape', points: '0 0 16 0 16 16 0 16' }), _react2.default.createElement('path', { d: 'M0.666666667,16 L3.33333333,16 L3.33333333,8 L0.666666667,8 L0.666666667,16 Z M15.3333333,8.66666667 C15.3333333,7.93333333 14.7333333,7.33333333 14,7.33333333 L9.79333333,7.33333333 L10.4266667,4.28666667 L10.4466667,4.07333333 C10.4466667,3.8 10.3333333,3.54666667 10.1533333,3.36666667 L9.44666667,2.66666667 L5.06,7.06 C4.81333333,7.3 4.66666667,7.63333333 4.66666667,8 L4.66666667,14.6666667 C4.66666667,15.4 5.26666667,16 6,16 L12,16 C12.5533333,16 13.0266667,15.6666667 13.2266667,15.1866667 L15.24,10.4866667 C15.3,10.3333333 15.3333333,10.1733333 15.3333333,10 L15.3333333,8.72666667 L15.3266667,8.72 L15.3333333,8.66666667 Z', id: 'Shape', fill: this.props.theme.states.error, fillRule: 'nonzero', transform: 'translate(8.000000, 9.333333) scale(1, -1) translate(-8.000000, -9.333333) ' }) ) ) ); } }]); return ThumbsDownIcon; }(_react.Component); ThumbsDownIcon.propTypes = { width: _propTypes.PropTypes.string }; ThumbsDownIcon.defaultProps = { width: '20px', theme: _extends({}, _colorCodes.guidelineColors) }; exports.default = (0, _styledComponents.withTheme)(ThumbsDownIcon);