jss-extend
Advanced tools
Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "jss-extend", | ||
"description": "Inheritance plugin for jss", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"author": { | ||
@@ -28,4 +28,4 @@ "name": "Oleg Slobodskoi", | ||
"dependencies": { | ||
"jsstyles": "^1.0.0" | ||
"jsstyles": "^2.1.0" | ||
} | ||
} |
{ | ||
"name": "jss-extend", | ||
"description": "Inheritance plugin for jss", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"author": { | ||
@@ -31,7 +31,7 @@ "name": "Oleg Slobodskoi", | ||
"xpkg": "0.2.0", | ||
"jss": "^1.0.0" | ||
"jss": "^2.1.0" | ||
}, | ||
"peerDependencies": { | ||
"jss": "^1.0.0" | ||
"jss": "^2.1.0" | ||
} | ||
} |
## Inheritance plugin for JSS | ||
This plugin implements `extend` keyword for [jss](https://github.com/jsstyles/jss). | ||
For those who uses an ES6 transpiler - you can achieve the same by using the language itself. | ||
```javascript | ||
var redButton = { | ||
background: 'red' | ||
} | ||
export default { | ||
button: { | ||
...redButton, | ||
'font-size': '20px' | ||
} | ||
} | ||
``` | ||
This plugin implements `extend` property for [jss](https://github.com/jsstyles/jss). | ||
Take a look at [examples](http://jsstyles.github.io/jss-extend/examples/index.html) directory. | ||
@@ -14,3 +30,3 @@ | ||
exports.styles = { | ||
'.button': { | ||
button: { | ||
extend: redButton, // can be an array of styles | ||
@@ -17,0 +33,0 @@ 'font-size': '20px' |
@@ -14,3 +14,3 @@ 'use strict' | ||
var a = {float: 'left'} | ||
var ss = new jss.StyleSheet({ | ||
var ss = jss.createStyleSheet({ | ||
a: a, | ||
@@ -30,3 +30,3 @@ b: { | ||
var b = {position: 'absolute'} | ||
var ss = new jss.StyleSheet({ | ||
var ss = jss.createStyleSheet({ | ||
c: { | ||
@@ -44,3 +44,3 @@ extend: [a, b], | ||
var b = {extend: c, display: 'none'} | ||
var ss = new jss.StyleSheet({ | ||
var ss = jss.createStyleSheet({ | ||
a: { | ||
@@ -47,0 +47,0 @@ extend: b, |
Sorry, the diff of this file is not supported yet
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
11502
65