Skip to content

Commit c4e6820

Browse files
committed
Pipe all the props sent to Notifications to NotifySystem, resolves issues with styles, noAnimation.. properties
1 parent 8bece2e commit c4e6820

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

dist/react-notification-system-redux.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16688,6 +16688,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
1668816688

1668916689
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
1669016690

16691+
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; }
16692+
1669116693
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
1669216694

1669316695
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; }
@@ -16747,7 +16749,12 @@ var Notifications = (function (_React$Component) {
1674716749
}, {
1674816750
key: 'render',
1674916751
value: function render() {
16750-
return _react2['default'].createElement(_reactNotificationSystem2['default'], { ref: 'notify' });
16752+
var _props = this.props;
16753+
var notifications = _props.notifications;
16754+
16755+
var rest = _objectWithoutProperties(_props, ['notifications']);
16756+
16757+
return _react2['default'].createElement(_reactNotificationSystem2['default'], _extends({ ref: 'notify' }, rest));
1675116758
}
1675216759
}]);
1675316760

dist/react-notification-system-redux.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/notifications.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
1414

1515
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
1616

17+
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; }
18+
1719
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
1820

1921
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; }
@@ -73,7 +75,12 @@ var Notifications = (function (_React$Component) {
7375
}, {
7476
key: 'render',
7577
value: function render() {
76-
return _react2['default'].createElement(_reactNotificationSystem2['default'], { ref: 'notify' });
78+
var _props = this.props;
79+
var notifications = _props.notifications;
80+
81+
var rest = _objectWithoutProperties(_props, ['notifications']);
82+
83+
return _react2['default'].createElement(_reactNotificationSystem2['default'], _extends({ ref: 'notify' }, rest));
7784
}
7885
}]);
7986

src/notifications.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class Notifications extends React.Component {
3030
}
3131

3232
render() {
33+
const {notifications, ...rest} = this.props;
34+
3335
return (
34-
<NotifySystem ref='notify' />
36+
<NotifySystem ref='notify' { ...rest } />
3537
);
3638
}
3739
}

0 commit comments

Comments
 (0)