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

classnames

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classnames - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

bind.js

@@ -42,3 +42,3 @@ /*!

// register as 'classnames', consistent with npm package name
define('classnames', function () {
define('classnames', [], function () {
return classNames;

@@ -45,0 +45,0 @@ });

{
"name": "classnames",
"version": "2.2.0",
"version": "2.2.1",
"description": "A simple utility for conditionally joining classNames together",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -73,5 +73,5 @@ /*!

_parseArray(classSet, arguments);
var list = [];
for (var k in classSet) {

@@ -93,3 +93,3 @@ if (hasOwn.call(classSet, k) && classSet[k]) {

// register as 'classnames', consistent with npm package name
define('classnames', function () {
define('classnames', [], function () {
return classNames;

@@ -96,0 +96,0 @@ });

# Changelog
## v2.2.1 / 2015-11-26
* Add deps parameter to the AMD module, fixes an issue using the Dojo loader, thanks [Chris Jordan](https://github.com/flipperkid)
## v2.2.0 / 2015-10-18

@@ -4,0 +8,0 @@

@@ -42,3 +42,3 @@ /*!

// register as 'classnames', consistent with npm package name
define('classnames', function () {
define('classnames', [], function () {
return classNames;

@@ -45,0 +45,0 @@ });

{
"name": "classnames",
"version": "2.2.0",
"version": "2.2.1",
"description": "A simple utility for conditionally joining classNames together",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -70,3 +70,3 @@ Classnames

if (this.state.isPressed) btnClass += ' btn-pressed';
else if (this.state.isHovered) buttonClass += ' btn-over';
else if (this.state.isHovered) btnClass += ' btn-over';
return <button className={btnClass}>{this.props.label}</button>;

@@ -141,3 +141,28 @@ }

Real-world example:
```js
/* components/submit-button.js */
import { Component } from 'react';
import classNames from 'classnames/bind';
import styles from './submit-button.css';
let cx = classNames.bind(styles);
export default class SubmitButton extends Component {
render () {
let text = this.props.store.submissionInProgress ? 'Processing...' : 'Submit';
let className = cx({
base: true,
inProgress: this.props.store.submissionInProgress,
error: this.props.store.errorOccurred,
disabled: this.props.form.valid,
});
return <button className={className}>{text}</button>;
}
}
```
## Polyfills needed to support older browsers

@@ -144,0 +169,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