@hig/side-nav
Advanced tools
Comparing version 0.1.0-alpha.26ea0b86 to 0.1.0-alpha.26ea900f
@@ -126,3 +126,5 @@ import React, { Component } from 'react'; | ||
value: function render() { | ||
var _this2 = this; | ||
var _props = this.props, | ||
intro = _props.intro, | ||
children = _props.children; | ||
@@ -141,3 +143,8 @@ var classes = function classes(themeClass) { | ||
{ className: classes(themeClass) }, | ||
_this2.props.children | ||
intro && React.createElement( | ||
"div", | ||
{ className: "hig__side-nav__group__intro" }, | ||
intro | ||
), | ||
children | ||
); | ||
@@ -153,2 +160,4 @@ } | ||
Group.propTypes = { | ||
/** A slot for arbitrary content to render above the Modules */ | ||
intro: PropTypes.node, | ||
/** One or more SideNav Modules */ | ||
@@ -161,2 +170,9 @@ children: PropTypes.node | ||
"props": { | ||
"intro": { | ||
"type": { | ||
"name": "node" | ||
}, | ||
"required": false, | ||
"description": "A slot for arbitrary content to render above the Modules" | ||
}, | ||
"children": { | ||
@@ -659,6 +675,8 @@ "type": { | ||
_this.handleModuleMinimizeToggle = function (e) { | ||
return _this.setState({ minimized: !_this.state.minimized }, function () { | ||
return _this.props.onClickCollapseButton && _this.props.onClickCollapseButton(e); | ||
}); | ||
_this.createMinimizeToggler = function (callback) { | ||
return function () { | ||
_this.setState({ minimized: !_this.state.minimized }, function () { | ||
return callback && callback(); | ||
}); | ||
}; | ||
}; | ||
@@ -685,2 +703,8 @@ | ||
/** | ||
* @param {Function} callback, function to call after minimize state has been toggled | ||
* @returns {Function} | ||
*/ | ||
_createClass$5(Module$$1, [{ | ||
@@ -699,4 +723,4 @@ key: "createPresenterBag", | ||
minimized: minimized, | ||
onClickCollapseButton: this.handleModuleMinimizeToggle, | ||
onClickTitle: this.handleModuleMinimizeToggle | ||
onClickCollapseButton: this.createMinimizeToggler(this.props.onClickCollapseButton), | ||
onClickTitle: this.createMinimizeToggler(this.props.onClickTitle) | ||
}; | ||
@@ -703,0 +727,0 @@ } |
{ | ||
"name": "@hig/side-nav", | ||
"version": "0.1.0-alpha.26ea0b86", | ||
"version": "0.1.0-alpha.26ea900f", | ||
"description": "HIG SideNav components", | ||
@@ -18,12 +18,12 @@ "author": "Autodesk Inc.", | ||
"dependencies": { | ||
"@hig/icon": "0.1.0-alpha.26ea0b86", | ||
"@hig/icon-button": "0.1.0-alpha.26ea0b86", | ||
"@hig/skeleton-item": "0.1.0-alpha.26ea0b86", | ||
"@hig/themes": "0.1.0-alpha.26ea0b86", | ||
"@hig/icon": "0.1.0-alpha.26ea900f", | ||
"@hig/icon-button": "0.1.0-alpha.26ea900f", | ||
"@hig/skeleton-item": "0.1.0-alpha.26ea900f", | ||
"@hig/themes": "0.1.0-alpha.26ea900f", | ||
"classnames": "^2.2.5" | ||
}, | ||
"devDependencies": { | ||
"@hig/babel-preset": "0.2.0-alpha.26ea0b86", | ||
"@hig/scripts": "0.2.0-alpha.26ea0b86", | ||
"@hig/styles": "0.1.0-alpha.26ea0b86" | ||
"@hig/babel-preset": "0.2.0-alpha.26ea900f", | ||
"@hig/scripts": "0.2.0-alpha.26ea900f", | ||
"@hig/styles": "0.1.0-alpha.26ea900f" | ||
}, | ||
@@ -30,0 +30,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
214502
4869
0
43
+ Added@hig/icon@0.1.0-alpha.26ea900f(transitive)
+ Added@hig/icon-button@0.1.0-alpha.26ea900f(transitive)
+ Added@hig/icons@0.1.0-alpha.26ea900f(transitive)
+ Added@hig/skeleton-item@0.1.0-alpha.26ea900f(transitive)
+ Added@hig/themes@0.1.0-alpha.26ea900f(transitive)
- Removed@hig/icon@0.1.0-alpha.26ea0b86(transitive)
- Removed@hig/icon-button@0.1.0-alpha.26ea0b86(transitive)
- Removed@hig/icons@0.1.0-alpha.26ea0b86(transitive)
- Removed@hig/skeleton-item@0.1.0-alpha.26ea0b86(transitive)
- Removed@hig/themes@0.1.0-alpha.26ea0b86(transitive)