Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

essence-chip

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

essence-chip - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

lib/chip.js

@@ -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 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc