Skip to content

Commit

Permalink
v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ameerthehacker committed Feb 11, 2021
1 parent ab61b94 commit 0554051
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,14 @@ var LazyLoad = function (_Component) {
height = _props2.height,
children = _props2.children,
placeholder = _props2.placeholder,
className = _props2.className,
classNamePrefix = _props2.classNamePrefix,
style = _props2.style;


return _react2.default.createElement(
'div',
{ className: classNamePrefix + '-wrapper', ref: this.setRef, style: style },
{ className: classNamePrefix + '-wrapper ' + className, ref: this.setRef, style: style },
this.visible ? children : placeholder ? placeholder : _react2.default.createElement('div', {
style: { height: height },
className: classNamePrefix + '-placeholder'
Expand All @@ -373,6 +374,7 @@ var LazyLoad = function (_Component) {
}(_react.Component);

LazyLoad.propTypes = {
className: _propTypes2.default.string,
classNamePrefix: _propTypes2.default.string,
once: _propTypes2.default.bool,
height: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
Expand All @@ -390,6 +392,7 @@ LazyLoad.propTypes = {
};

LazyLoad.defaultProps = {
className: '',
classNamePrefix: 'lazyload',
once: false,
offset: 0,
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.1.1",
"version": "3.2.0",
"description": "Lazyload your components, images or anything where performance matters.",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 0554051

Please sign in to comment.