Skip to content

Commit aada2c0

Browse files
v3.1.0
1 parent 572167e commit aada2c0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,13 @@ var LazyLoad = function (_Component) {
354354
height = _props2.height,
355355
children = _props2.children,
356356
placeholder = _props2.placeholder,
357-
classNamePrefix = _props2.classNamePrefix;
357+
classNamePrefix = _props2.classNamePrefix,
358+
style = _props2.style;
358359

359360

360361
return _react2.default.createElement(
361362
'div',
362-
{ className: classNamePrefix + '-wrapper', ref: this.setRef },
363+
{ className: classNamePrefix + '-wrapper', ref: this.setRef, style: style },
363364
this.visible ? children : placeholder ? placeholder : _react2.default.createElement('div', {
364365
style: { height: height },
365366
className: classNamePrefix + '-placeholder'
@@ -384,7 +385,8 @@ LazyLoad.propTypes = {
384385
debounce: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.bool]),
385386
placeholder: _propTypes2.default.node,
386387
scrollContainer: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
387-
unmountIfInvisible: _propTypes2.default.bool
388+
unmountIfInvisible: _propTypes2.default.bool,
389+
style: _propTypes2.default.object
388390
};
389391

390392
LazyLoad.defaultProps = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-lazyload",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Lazyload your components, images or anything where performance matters.",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)