Skip to content

Commit

Permalink
v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ameerthehacker committed Oct 23, 2020
1 parent 572167e commit aada2c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,13 @@ var LazyLoad = function (_Component) {
height = _props2.height,
children = _props2.children,
placeholder = _props2.placeholder,
classNamePrefix = _props2.classNamePrefix;
classNamePrefix = _props2.classNamePrefix,
style = _props2.style;


return _react2.default.createElement(
'div',
{ className: classNamePrefix + '-wrapper', ref: this.setRef },
{ className: classNamePrefix + '-wrapper', ref: this.setRef, style: style },
this.visible ? children : placeholder ? placeholder : _react2.default.createElement('div', {
style: { height: height },
className: classNamePrefix + '-placeholder'
Expand All @@ -384,7 +385,8 @@ LazyLoad.propTypes = {
debounce: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.bool]),
placeholder: _propTypes2.default.node,
scrollContainer: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
unmountIfInvisible: _propTypes2.default.bool
unmountIfInvisible: _propTypes2.default.bool,
style: _propTypes2.default.object
};

LazyLoad.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-lazyload",
"version": "3.0.0",
"version": "3.1.0",
"description": "Lazyload your components, images or anything where performance matters.",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit aada2c0

Please sign in to comment.