Skip to content

Commit 0554051

Browse files
v3.2.0
1 parent ab61b94 commit 0554051

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,14 @@ var LazyLoad = function (_Component) {
354354
height = _props2.height,
355355
children = _props2.children,
356356
placeholder = _props2.placeholder,
357+
className = _props2.className,
357358
classNamePrefix = _props2.classNamePrefix,
358359
style = _props2.style;
359360

360361

361362
return _react2.default.createElement(
362363
'div',
363-
{ className: classNamePrefix + '-wrapper', ref: this.setRef, style: style },
364+
{ className: classNamePrefix + '-wrapper ' + className, ref: this.setRef, style: style },
364365
this.visible ? children : placeholder ? placeholder : _react2.default.createElement('div', {
365366
style: { height: height },
366367
className: classNamePrefix + '-placeholder'
@@ -373,6 +374,7 @@ var LazyLoad = function (_Component) {
373374
}(_react.Component);
374375

375376
LazyLoad.propTypes = {
377+
className: _propTypes2.default.string,
376378
classNamePrefix: _propTypes2.default.string,
377379
once: _propTypes2.default.bool,
378380
height: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
@@ -390,6 +392,7 @@ LazyLoad.propTypes = {
390392
};
391393

392394
LazyLoad.defaultProps = {
395+
className: '',
393396
classNamePrefix: 'lazyload',
394397
once: false,
395398
offset: 0,

package.json

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

0 commit comments

Comments
 (0)