er-react-alert
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -59,5 +59,5 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap | ||
var _classnames = __webpack_require__(2); | ||
var _classnames2 = __webpack_require__(2); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _classnames3 = _interopRequireDefault(_classnames2); | ||
@@ -70,2 +70,4 @@ var _Alert = __webpack_require__(3); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -92,3 +94,3 @@ | ||
value: function closeAlert() { | ||
this.props.onCloseAlert(); | ||
this.props.onClose(); | ||
} | ||
@@ -98,3 +100,3 @@ }, { | ||
value: function render() { | ||
var alertClasses = (0, _classnames2.default)(_Alert2.default.alert, _Alert2.default[this.props.type]); | ||
var alertClasses = (0, _classnames3.default)(_Alert2.default.alert, _Alert2.default[this.props.type], _defineProperty({}, _Alert2.default.show, this.props.isOpen)); | ||
var title = this.props.type[0].toUpperCase() + this.props.type.slice(1); | ||
@@ -126,5 +128,6 @@ | ||
Alert.propTypes = { | ||
isOpen: _react2.default.PropTypes.bool, | ||
text: _react2.default.PropTypes.string, | ||
type: _react2.default.PropTypes.oneOf(['danger', 'success', 'info', 'warning']), | ||
onCloseAlert: _react2.default.PropTypes.func | ||
onClose: _react2.default.PropTypes.func | ||
}; | ||
@@ -151,5 +154,5 @@ | ||
// removed by extract-text-webpack-plugin | ||
module.exports = {"alert":"Alert__alert__1RXQB","danger":"Alert__danger__22uvw","success":"Alert__success__jolmI","info":"Alert__info__20CN1","warning":"Alert__warning__2BP4w","closebtn":"Alert__closebtn__N7T85"}; | ||
module.exports = {"alert":"Alert__alert__1RXQB","danger":"Alert__danger__22uvw","success":"Alert__success__jolmI","info":"Alert__info__20CN1","warning":"Alert__warning__2BP4w","show":"Alert__show__2Fdms","closebtn":"Alert__closebtn__N7T85"}; | ||
/***/ } | ||
/******/ ]))); |
{ | ||
"name": "er-react-alert", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/er-react-alert.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8324
150