essence-chip
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -5,6 +5,2 @@ 'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _react = require('react'); | ||
@@ -41,2 +37,3 @@ | ||
value: '', | ||
iconColor: '', | ||
classes: (0, _classnames2.default)('chips', _this.props.classes, _this.props.className) | ||
@@ -48,2 +45,10 @@ }; | ||
_createClass(Chip, [{ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
iconColor: nextProps.iconColor, | ||
classes: (0, _classnames2.default)('chips', nextProps.classes, nextProps.className) | ||
}); | ||
} | ||
}, { | ||
key: 'selectContact', | ||
@@ -91,3 +96,3 @@ value: function selectContact(data) { | ||
'span', | ||
{ className: 'icon' }, | ||
{ className: (0, _classnames2.default)('icon', this.state.iconColor) }, | ||
this.props.data.icon | ||
@@ -94,0 +99,0 @@ ) : _react2.default.createElement('span', { className: 'empty' }); |
@@ -7,6 +7,2 @@ 'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _react = require('react'); | ||
@@ -13,0 +9,0 @@ |
{ | ||
"name": "essence-chip", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Essence Chip - Chip & ChipItem components", | ||
@@ -5,0 +5,0 @@ "author": "Hetmann W. Iohan <wilhelm.hetmann@evozon.com>", |
@@ -9,2 +9,3 @@ # Essence Chip - Chip component | ||
- **icon**: string or image url | ||
- **iconColor**: string from the Colors list | ||
- **deletable**: boolean ( **true** or **false** ) - default: **false** | ||
@@ -53,5 +54,5 @@ - **onClose**: callback for on closing chip component | ||
<Block> | ||
<ChipTest data={redbullChip} /> | ||
<ChipTest data={redbullChip} iconColor='e-background-indigo-400' /> | ||
<ChipTest data={goproChip} /> | ||
</Block> | ||
``` |
@@ -12,2 +12,3 @@ | ||
value: '', | ||
iconColor: '', | ||
classes: ClassNames( | ||
@@ -21,2 +22,13 @@ 'chips', | ||
componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
iconColor: nextProps.iconColor, | ||
classes: ClassNames( | ||
'chips', | ||
nextProps.classes, | ||
nextProps.className | ||
) | ||
}); | ||
} | ||
selectContact(data) { | ||
@@ -57,3 +69,3 @@ this.setState({ | ||
this.props.data.icon ? | ||
<span className={'icon'}>{this.props.data.icon}</span> : | ||
<span className={ClassNames('icon', this.state.iconColor)}>{this.props.data.icon}</span> : | ||
<span className={'empty'} /> | ||
@@ -60,0 +72,0 @@ ); |
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
27840
562
56