diff --git a/docs/index.js b/docs/index.js index e73d237..341ce71 100644 --- a/docs/index.js +++ b/docs/index.js @@ -21106,7 +21106,9 @@ Cogs.define("react-list.js", function (COGS_REQUIRE, COGS_REQUIRE_ASYNC, module, axis = _props7.axis, length = _props7.length, type = _props7.type, - useTranslate3d = _props7.useTranslate3d; + useTranslate3d = _props7.useTranslate3d, + className = _props7.className, + classNameInner = _props7.classNameInner; var _state7 = this.state, from = _state7.from, itemsPerRow = _state7.itemsPerRow; @@ -21136,10 +21138,10 @@ Cogs.define("react-list.js", function (COGS_REQUIRE, COGS_REQUIRE_ASYNC, module, 'div', { style: style, ref: function ref(c) { return _this4.el = c; - } }, + }, className: className }, _react2.default.createElement( 'div', - { style: listStyle }, + { style: listStyle, className: classNameInner }, items ) ); @@ -21162,7 +21164,9 @@ Cogs.define("react-list.js", function (COGS_REQUIRE, COGS_REQUIRE_ASYNC, module, threshold: _propTypes2.default.number, type: _propTypes2.default.oneOf(['simple', 'variable', 'uniform']), useStaticSize: _propTypes2.default.bool, - useTranslate3d: _propTypes2.default.bool + useTranslate3d: _propTypes2.default.bool, + className: _propTypes2.default.string, + classNameInner: _propTypes2.default.string }, _class.defaultProps = { axis: 'y', itemRenderer: function itemRenderer(index, key) { @@ -21187,7 +21191,9 @@ Cogs.define("react-list.js", function (COGS_REQUIRE, COGS_REQUIRE_ASYNC, module, threshold: 100, type: 'simple', useStaticSize: false, - useTranslate3d: false + useTranslate3d: false, + className: 'ReactList', + classNameInner: 'ReactList__inner' }, _temp); }); }); diff --git a/package-lock.json b/package-lock.json index 8463112..cd617e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-list", - "version": "0.8.10", + "version": "0.8.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/react-list.es6 b/react-list.es6 index 90d9ece..da49a24 100644 --- a/react-list.es6 +++ b/react-list.es6 @@ -78,7 +78,9 @@ module.exports = class ReactList extends Component { threshold: PropTypes.number, type: PropTypes.oneOf(['simple', 'variable', 'uniform']), useStaticSize: PropTypes.bool, - useTranslate3d: PropTypes.bool + useTranslate3d: PropTypes.bool, + className: PropTypes.string, + classNameInner: PropTypes.string }; static defaultProps = { @@ -93,7 +95,9 @@ module.exports = class ReactList extends Component { threshold: 100, type: 'simple', useStaticSize: false, - useTranslate3d: false + useTranslate3d: false, + className: 'ReactList', + classNameInner: 'ReactList__inner' }; constructor(props) { @@ -471,7 +475,7 @@ module.exports = class ReactList extends Component { } render() { - const {axis, length, type, useTranslate3d} = this.props; + const {axis, length, type, useTranslate3d, className, classNameInner} = this.props; const {from, itemsPerRow} = this.state; const items = this.renderItems(); @@ -498,8 +502,8 @@ module.exports = class ReactList extends Component { transform }; return ( -
this.el = c}> -
{items}
+
this.el = c} className={className}> +
{items}
); } diff --git a/react-list.js b/react-list.js index 8719233..43f4952 100644 --- a/react-list.js +++ b/react-list.js @@ -621,7 +621,9 @@ axis = _props7.axis, length = _props7.length, type = _props7.type, - useTranslate3d = _props7.useTranslate3d; + useTranslate3d = _props7.useTranslate3d, + className = _props7.className, + classNameInner = _props7.classNameInner; var _state7 = this.state, from = _state7.from, itemsPerRow = _state7.itemsPerRow; @@ -651,10 +653,10 @@ 'div', { style: style, ref: function ref(c) { return _this4.el = c; - } }, + }, className: className }, _react2.default.createElement( 'div', - { style: listStyle }, + { style: listStyle, className: classNameInner }, items ) ); @@ -677,7 +679,9 @@ threshold: _propTypes2.default.number, type: _propTypes2.default.oneOf(['simple', 'variable', 'uniform']), useStaticSize: _propTypes2.default.bool, - useTranslate3d: _propTypes2.default.bool + useTranslate3d: _propTypes2.default.bool, + className: _propTypes2.default.string, + classNameInner: _propTypes2.default.string }, _class.defaultProps = { axis: 'y', itemRenderer: function itemRenderer(index, key) { @@ -702,6 +706,8 @@ threshold: 100, type: 'simple', useStaticSize: false, - useTranslate3d: false + useTranslate3d: false, + className: 'ReactList', + classNameInner: 'ReactList__inner' }, _temp); });