rc-notification
Advanced tools
Comparing version 1.3.6 to 1.4.0
@@ -35,2 +35,4 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
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; } | ||
@@ -131,5 +133,13 @@ | ||
Notification.newInstance = function newNotificationInstance(properties) { | ||
var props = properties || {}; | ||
var div = document.createElement('div'); | ||
document.body.appendChild(div); | ||
var _ref = properties || {}, | ||
getContainer = _ref.getContainer, | ||
props = _objectWithoutProperties(_ref, ['getContainer']); | ||
var div = void 0; | ||
if (getContainer) { | ||
div = getContainer(); | ||
} else { | ||
div = document.createElement('div'); | ||
document.body.appendChild(div); | ||
} | ||
var notification = _reactDom2["default"].render(_react2["default"].createElement(Notification, props), div); | ||
@@ -136,0 +146,0 @@ return { |
{ | ||
"name": "rc-notification", | ||
"version": "1.3.6", | ||
"version": "1.4.0", | ||
"description": "notification ui component for react", | ||
@@ -63,2 +63,2 @@ "keywords": [ | ||
] | ||
} | ||
} |
@@ -88,2 +88,8 @@ # rc-notification | ||
</tr> | ||
<tr> | ||
<td>getContainer</td> | ||
<td>getContainer(): HTMLElement</td> | ||
<td></td> | ||
<td>function returning html node which will act as notification container</td> | ||
</tr> | ||
</tbody> | ||
@@ -90,0 +96,0 @@ </table> |
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
17226
320
176