Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 9223af1

Browse files
committed
bumped to 2.2.0, npm run build
1 parent 80b3dd3 commit 9223af1

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

build/react-dat-gui.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6443,6 +6443,8 @@ Object.defineProperty(exports, "__esModule", {
64436443
value: true
64446444
});
64456445

6446+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6447+
64466448
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
64476449

64486450
var _react = __webpack_require__(0);
@@ -6459,6 +6461,8 @@ var _classnames2 = _interopRequireDefault(_classnames);
64596461

64606462
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64616463

6464+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
6465+
64626466
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64636467

64646468
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -6489,12 +6493,24 @@ var DatFolder = function (_Component) {
64896493
}
64906494

64916495
_createClass(DatFolder, [{
6496+
key: 'renderChildren',
6497+
value: function renderChildren() {
6498+
// Disable this rule to take title out of the props so nested folders can have unique titles.
6499+
// eslint-disable-next-line no-unused-vars
6500+
var _props = this.props,
6501+
children = _props.children,
6502+
title = _props.title,
6503+
rest = _objectWithoutProperties(_props, ['children', 'title']);
6504+
6505+
return _react2.default.Children.map(children, function (child) {
6506+
return (0, _react.cloneElement)(child, _extends({}, rest));
6507+
});
6508+
}
6509+
}, {
64926510
key: 'render',
64936511
value: function render() {
64946512
var closed = this.state.closed;
6495-
var _props = this.props,
6496-
title = _props.title,
6497-
children = _props.children;
6513+
var title = this.props.title;
64986514

64996515

65006516
return _react2.default.createElement(
@@ -6511,7 +6527,7 @@ var DatFolder = function (_Component) {
65116527
_react2.default.createElement(
65126528
'ul',
65136529
null,
6514-
children
6530+
this.renderChildren()
65156531
)
65166532
)
65176533
);

build/react-dat-gui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-dat-gui",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "dat.GUI reimagined for React",
55
"main": "build/react-dat-gui.js",
66
"style": "build/react-dat-gui.css",

0 commit comments

Comments
 (0)