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
88 lines (68 loc) • 5 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 ExclamationCircleSolidIcon = function (_Component) {
_inherits(ExclamationCircleSolidIcon, _Component);
function ExclamationCircleSolidIcon() {
_classCallCheck(this, ExclamationCircleSolidIcon);
return _possibleConstructorReturn(this, (ExclamationCircleSolidIcon.__proto__ || Object.getPrototypeOf(ExclamationCircleSolidIcon)).apply(this, arguments));
}
_createClass(ExclamationCircleSolidIcon, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'svg',
{ x: '0', y: '0', viewBox: '0 0 14 14', width: this.props.width },
_react2.default.createElement(
'g',
{ stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
_react2.default.createElement(
'g',
{ transform: 'translate(-236.000000, -469.000000)' },
_react2.default.createElement(
'g',
{ transform: 'translate(50.000000, 253.000000)' },
_react2.default.createElement(
'g',
{ transform: 'translate(185.000000, 215.000000)' },
_react2.default.createElement(
'g',
null,
_react2.default.createElement('polygon', { points: '0 0 16 0 16 16 0 16' }),
_react2.default.createElement('path', {
d: 'M8,1.33333333 C4.32,1.33333333 1.33333333,4.32 1.33333333,8 C1.33333333,11.68 4.32,14.6666667 8,14.6666667 C11.68,14.6666667 14.6666667,11.68 14.6666667,8 C14.6666667,4.32 11.68,1.33333333 8,1.33333333 Z M8.66666667,11.3333333 L7.33333333,11.3333333 L7.33333333,10 L8.66666667,10 L8.66666667,11.3333333 Z M8.66666667,8.66666667 L7.33333333,8.66666667 L7.33333333,4.66666667 L8.66666667,4.66666667 L8.66666667,8.66666667 Z',
fill: this.props.color || this.props.theme.states.error,
fillRule: 'nonzero'
})
)
)
)
)
)
);
}
}]);
return ExclamationCircleSolidIcon;
}(_react.Component);
ExclamationCircleSolidIcon.propTypes = {
width: _propTypes.PropTypes.string,
color: _propTypes.PropTypes.string
};
ExclamationCircleSolidIcon.defaultProps = {
width: '20px',
theme: _extends({}, _colorCodes.guidelineColors),
color: ''
};
exports.default = (0, _styledComponents.withTheme)(ExclamationCircleSolidIcon);