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
72 lines (55 loc) • 3.71 kB
JavaScript
;
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 DefaultImageIcon = function (_Component) {
_inherits(DefaultImageIcon, _Component);
function DefaultImageIcon() {
_classCallCheck(this, DefaultImageIcon);
return _possibleConstructorReturn(this, (DefaultImageIcon.__proto__ || Object.getPrototypeOf(DefaultImageIcon)).apply(this, arguments));
}
_createClass(DefaultImageIcon, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'svg',
{
width: this.props.width,
height: this.props.height,
viewBox: '0 0 70 54'
},
_react2.default.createElement(
'g',
{ stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
_react2.default.createElement(
'g',
{
transform: 'translate(5.000000, 5.000000)',
fill: '#EAEAEA',
fillRule: 'nonzero'
},
_react2.default.createElement('path', { d: 'M60,38.1818182 L60,5.45454545 C60,2.45454545 57.5454545,0 54.5454545,0 L5.45454545,0 C2.45454545,0 0,2.45454545 0,5.45454545 L0,38.1818182 C0,41.1818182 2.45454545,43.6363636 5.45454545,43.6363636 L54.5454545,43.6363636 C57.5454545,43.6363636 60,41.1818182 60,38.1818182 Z M20.5454546,18.0909091 L27.3636364,26.2727273 L36.9090909,14 L49.1818182,30.3636364 L11,30.3636364 L20.5454546,18.0909091 Z' })
)
)
);
}
}]);
return DefaultImageIcon;
}(_react.Component);
DefaultImageIcon.propTypes = {
width: _propTypes.PropTypes.string,
height: _propTypes.PropTypes.string
};
DefaultImageIcon.defaultProps = {
width: '50px',
height: '50px'
};
exports.default = DefaultImageIcon;