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

classed-components

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classed-components - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/main.js

24

package.json

@@ -13,9 +13,12 @@ {

"name": "classed-components",
"version": "0.3.0",
"version": "0.4.0",
"description": "Like styled-components but for classes. Quickly create components based on CSS classes.",
"main": "lib/index.js",
"main": "lib/main.js",
"module": "src/index.js",
"scripts": {
"test": "jest",
"build": "babel --out-dir lib src --ignore \"**/*.test.js\"",
"watch": "babel --watch --out-dir lib src --ignore \"**/*.test.js\""
"build": "NODE_ENV=production webpack --color --progress",
"watch": "NODE_ENV=production webpack --color --progress --watch",
"build:dev": "NODE_ENV=development webpack --color --progress",
"watch:dev": "NODE_ENV=development webpack --color --progress --watch"
},

@@ -29,5 +32,7 @@ "author": "Kolja Kirchner",

"babel-jest": "^18.0.0",
"babel-loader": "^6.4.1",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-preset-env": "^1.3.3",
"babel-preset-es2015": "^6.22.0",

@@ -37,12 +42,15 @@ "babel-preset-latest": "^6.16.0",

"babel-preset-stage-0": "^6.22.0",
"compression-webpack-plugin": "^0.4.0",
"enzyme": "^2.7.1",
"jest": "^18.1.0",
"react": "^15.4.1",
"react-addons-test-utils": "^15.4.2",
"react": "^15.4.1",
"react-dom": "^15.4.2",
"react-test-renderer": "^15.4.2"
"react-dom": "^15.5.3",
"react-test-renderer": "^15.4.2",
"webpack": "^2.3.3"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0-0"
"react": "^0.14.0 || ^15.0.0-0",
"prop-types": "^15.5.6"
}
}

@@ -73,6 +73,19 @@ # classed-components

### className prop
Please note that adding the className prop to a classed component will overwrite its class names.
```javascript
const Header = classed.div`
test-class
`
// ...
// Do not do this:
<Header className='will-overwrite-test-class' />
```

@@ -34,3 +34,3 @@ import {createElement} from 'react'

const append = appendClass(realizations)
const className = classes.reduce(append, props.className || '')
const className = classes.reduce(append, '')
return normalize(className)

@@ -37,0 +37,0 @@ }

@@ -12,5 +12,11 @@ import domElements from './utils/domElements'

const addTagFn = (acc, tag) => {
acc[tag] = buildTagFunction.withName(tag)
return acc
}
domElements.forEach(tag => classed[tag] = buildTagFunction.withName(tag))
domElements.reduce(addTagFn, classed)
// classed is a function with properties that are functions as well
export default classed

@@ -1,3 +0,1 @@

import classed from './classed/classed'
export default classed
export default from './classed'

Sorry, the diff of this file is not supported yet

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