@cimpress/react-components
Advanced tools
Comparing version 1.6.6 to 1.6.7
@@ -6,2 +6,8 @@ # MCP MEX React Components | ||
### 1.6.x | ||
###### 2017-02-08 | ||
**Component enhancements** | ||
* [Accordion] | ||
- Added `accordion-open` className to outer accordion when it is open. | ||
- Added `onClose` function to be called when the accordion closes itself. | ||
###### 2017-01-31 | ||
@@ -8,0 +14,0 @@ **Components** |
@@ -55,2 +55,9 @@ 'use strict'; | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps, prevState) { | ||
if (prevState.open && !this.state.open) { | ||
this.props.onClose && this.props.onClose(); | ||
} | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -69,3 +76,3 @@ value: function render() { | ||
'div', | ||
{ className: 'accordion ' + className, style: style }, | ||
{ className: 'accordion' + (open ? ' accordion-open' : ' ') + className, style: style }, | ||
_react2.default.createElement( | ||
@@ -108,3 +115,4 @@ 'div', | ||
bodyStyle: _propTypes2.default.object, | ||
className: _propTypes2.default.string | ||
className: _propTypes2.default.string, | ||
onClose: _propTypes2.default.func | ||
}; | ||
@@ -111,0 +119,0 @@ |
{ | ||
"name": "@cimpress/react-components", | ||
"version": "1.6.6", | ||
"version": "1.6.7", | ||
"description": "React components to support the MCP styleguide", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
249890
4165