From aada2c049bfe8c54ce01ff6c49ddad5437aa6305 Mon Sep 17 00:00:00 2001 From: ameerthehacker Date: Fri, 23 Oct 2020 14:54:23 +0530 Subject: [PATCH] v3.1.0 --- lib/index.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 78768e5..915a7f4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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' @@ -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 = { diff --git a/package.json b/package.json index e01b468..a411cbb 100644 --- a/package.json +++ b/package.json @@ -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": {