@@ -9,6 +9,8 @@ exports["default"] = void 0;
99
1010var _react = _interopRequireDefault ( require ( "react" ) ) ;
1111
12+ var _propTypes = _interopRequireDefault ( require ( "prop-types" ) ) ;
13+
1214var _reactstrap = require ( "reactstrap" ) ;
1315
1416function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { "default" : obj } ; }
@@ -150,11 +152,12 @@ var NotificationAlert = /*#__PURE__*/function (_React$Component) {
150152 color : options . type ,
151153 className : "alert-with-icon animated fadeInDown" ,
152154 toggle : toggle ,
153- key : nNumber
154- } , options . icon !== undefined ? /*#__PURE__*/ _react [ "default" ] . createElement ( "span" , {
155+ key : nNumber ,
156+ onClick : this . props . onClick
157+ } , options . icon !== undefined && /*#__PURE__*/ _react [ "default" ] . createElement ( "span" , {
155158 "data-notify" : "icon" ,
156159 className : options . icon
157- } ) : null , /*#__PURE__*/ _react [ "default" ] . createElement ( "span" , {
160+ } ) , /*#__PURE__*/ _react [ "default" ] . createElement ( "span" , {
158161 "data-notify" : "message"
159162 } , options . message ) ) ;
160163
@@ -187,7 +190,7 @@ var NotificationAlert = /*#__PURE__*/function (_React$Component) {
187190 margin : "0px auto" ,
188191 position : "fixed" ,
189192 transition : "all 0.5s ease-in-out" ,
190- zIndex : "1031"
193+ zIndex : this . props . zIndex
191194 } ;
192195
193196 if ( place . indexOf ( "t" ) !== - 1 ) {
@@ -232,26 +235,34 @@ var NotificationAlert = /*#__PURE__*/function (_React$Component) {
232235 }
233236 }
234237
235- return /*#__PURE__*/ _react [ "default" ] . createElement ( _reactstrap . Col , {
236- xs : 11 ,
237- sm : 4 ,
238+ return /*#__PURE__*/ _react [ "default" ] . createElement ( _react [ "default" ] . Fragment , null , /*#__PURE__*/ _react [ "default" ] . createElement ( _reactstrap . Col , {
239+ xs : "11" ,
240+ sm : "4" ,
238241 style : style
239242 } , this . state [ "notify" + place . toUpperCase ( ) ] . map ( function ( prop , key ) {
240243 return prop ;
241- } ) ) ;
244+ } ) ) ) ;
242245 }
243246 }
244247 } , {
245248 key : "render" ,
246249 value : function render ( ) {
247- return /*#__PURE__*/ _react [ "default" ] . createElement ( "div" , {
250+ return /*#__PURE__*/ _react [ "default" ] . createElement ( _react [ "default" ] . Fragment , null , /*#__PURE__*/ _react [ "default" ] . createElement ( "div" , {
248251 ref : this . refNotification
249- } , this . showAllNotifications ( "tl" ) , this . showAllNotifications ( "tc" ) , this . showAllNotifications ( "tr" ) , this . showAllNotifications ( "bl" ) , this . showAllNotifications ( "bc" ) , this . showAllNotifications ( "br" ) ) ;
252+ } , this . showAllNotifications ( "tl" ) , this . showAllNotifications ( "tc" ) , this . showAllNotifications ( "tr" ) , this . showAllNotifications ( "bl" ) , this . showAllNotifications ( "bc" ) , this . showAllNotifications ( "br" ) ) ) ;
250253 }
251254 } ] ) ;
252255
253256 return NotificationAlert ;
254257} ( _react [ "default" ] . Component ) ;
255258
259+ NotificationAlert . defaultProps = {
260+ zIndex : 9999 ,
261+ onClick : function onClick ( ) { }
262+ } ;
263+ NotificationAlert . propTypes = {
264+ zIndex : _propTypes [ "default" ] . number ,
265+ onClick : _propTypes [ "default" ] . func
266+ } ;
256267var _default = NotificationAlert ;
257268exports [ "default" ] = _default ;
0 commit comments