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
87 lines (67 loc) • 5.61 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 PickupReAttemptIcon = function (_Component) {
_inherits(PickupReAttemptIcon, _Component);
function PickupReAttemptIcon() {
_classCallCheck(this, PickupReAttemptIcon);
return _possibleConstructorReturn(this, (PickupReAttemptIcon.__proto__ || Object.getPrototypeOf(PickupReAttemptIcon)).apply(this, arguments));
}
_createClass(PickupReAttemptIcon, [{
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/Additional-Info-Pannel/Express/Pickup-Reattempt',
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: 'M18.5454545,9.25 L16.0909091,9.25 L16.0909091,6 L4.63636364,6 C3.73636364,6 3,6.73125 3,7.625 L3,16.5625 L4.63636364,16.5625 C4.63636364,17.91125 5.73272727,19 7.09090909,19 C8.44909091,19 9.54545455,17.91125 9.54545455,16.5625 L14.4545455,16.5625 C14.4545455,17.91125 15.5509091,19 16.9090909,19 C18.2672727,19 19.3636364,17.91125 19.3636364,16.5625 L21,16.5625 L21,12.5 L18.5454545,9.25 Z M7.09090909,17.78125 C6.41181818,17.78125 5.86363636,17.236875 5.86363636,16.5625 C5.86363636,15.888125 6.41181818,15.34375 7.09090909,15.34375 C7.77,15.34375 8.31818182,15.888125 8.31818182,16.5625 C8.31818182,17.236875 7.77,17.78125 7.09090909,17.78125 Z M18.1363636,10.46875 L19.74,12.5 L16.0909091,12.5 L16.0909091,10.46875 L18.1363636,10.46875 Z M16.9090909,17.78125 C16.23,17.78125 15.6818182,17.236875 15.6818182,16.5625 C15.6818182,15.888125 16.23,15.34375 16.9090909,15.34375 C17.5881818,15.34375 18.1363636,15.888125 18.1363636,16.5625 C18.1363636,17.236875 17.5881818,17.78125 16.9090909,17.78125 Z',
id: 'Combined-Shape',
fill: this.props.theme.states.error,
fillRule: 'nonzero',
transform: 'translate(12.000000, 12.500000) scale(-1, 1) translate(-12.000000, -12.500000) '
}),
_react2.default.createElement('path', {
d: 'M13,9.5 L13,11 L11,9 L13,7 L13,8.5 L16,8.5 C17.1045695,8.5 18,9.3954305 18,10.5 C18,11.6045695 17.1045695,12.5 16,12.5 L14.0157524,12.5 L14.0157524,11.5 L16,11.5 C16.5522847,11.5 17,11.0522847 17,10.5 C17,9.94771525 16.5522847,9.5 16,9.5 L13,9.5 Z',
id: 'Combined-Shape',
fill: '#FFFFFF'
})
)
)
);
}
}]);
return PickupReAttemptIcon;
}(_react.Component);
PickupReAttemptIcon.propTypes = {
width: _propTypes.PropTypes.string
};
PickupReAttemptIcon.defaultProps = {
width: '20px',
theme: _extends({}, _colorCodes.guidelineColors)
};
exports.default = (0, _styledComponents.withTheme)(PickupReAttemptIcon);