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
81 lines (61 loc) • 5.03 kB
JavaScript
;
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 MisshipmentIcon = function (_Component) {
_inherits(MisshipmentIcon, _Component);
function MisshipmentIcon() {
_classCallCheck(this, MisshipmentIcon);
return _possibleConstructorReturn(this, (MisshipmentIcon.__proto__ || Object.getPrototypeOf(MisshipmentIcon)).apply(this, arguments));
}
_createClass(MisshipmentIcon, [{
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/Misshipment-posibility',
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: 'M19.5454545,9.25 L17.0909091,9.25 L17.0909091,6 L5.63636364,6 C4.73636364,6 4,6.73125 4,7.625 L4,16.5625 L5.63636364,16.5625 C5.63636364,17.91125 6.73272727,19 8.09090909,19 C9.44909091,19 10.5454545,17.91125 10.5454545,16.5625 L15.4545455,16.5625 C15.4545455,17.91125 16.5509091,19 17.9090909,19 C19.2672727,19 20.3636364,17.91125 20.3636364,16.5625 L22,16.5625 L22,12.5 L19.5454545,9.25 Z M8.09090909,17.78125 C7.41181818,17.78125 6.86363636,17.236875 6.86363636,16.5625 C6.86363636,15.888125 7.41181818,15.34375 8.09090909,15.34375 C8.77,15.34375 9.31818182,15.888125 9.31818182,16.5625 C9.31818182,17.236875 8.77,17.78125 8.09090909,17.78125 Z M19.1363636,10.46875 L20.74,12.5 L17.0909091,12.5 L17.0909091,10.46875 L19.1363636,10.46875 Z M17.9090909,17.78125 C17.23,17.78125 16.6818182,17.236875 16.6818182,16.5625 C16.6818182,15.888125 17.23,15.34375 17.9090909,15.34375 C18.5881818,15.34375 19.1363636,15.888125 19.1363636,16.5625 C19.1363636,17.236875 18.5881818,17.78125 17.9090909,17.78125 Z M11,8 L12.5,8 L12.5,12 L11,12 L11,8 Z M11,13 L12.5,13 L12.5,14.5 L11,14.5 L11,13 Z',
id: 'Combined-Shape',
fill: this.props.theme.states.warning,
fillRule: 'nonzero'
})
)
)
);
}
}]);
return MisshipmentIcon;
}(_react.Component);
MisshipmentIcon.propTypes = {
width: _propTypes.PropTypes.string
};
MisshipmentIcon.defaultProps = {
width: '20px',
theme: _extends({}, _colorCodes.guidelineColors)
};
exports.default = (0, _styledComponents.withTheme)(MisshipmentIcon);