styled-system
Advanced tools
Comparing version 1.0.0-8 to 1.0.0-9
@@ -24,3 +24,3 @@ 'use strict'; | ||
return REG.test(key); | ||
}); | ||
}).sort(); | ||
var bp = breaks(props); | ||
@@ -27,0 +27,0 @@ var sc = idx(['theme', 'space'], props) || scale; |
{ | ||
"name": "styled-system", | ||
"version": "1.0.0-8", | ||
"version": "1.0.0-9", | ||
"description": "Design system utilities for styled-components, glamorous, and other css-in-js libraries", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -17,3 +17,5 @@ const { | ||
module.exports = props => { | ||
const keys = Object.keys(props).filter(key => REG.test(key)) | ||
const keys = Object.keys(props) | ||
.filter(key => REG.test(key)) | ||
.sort() | ||
const bp = breaks(props) | ||
@@ -20,0 +22,0 @@ const sc = idx([ 'theme', 'space' ], props) || scale |
13
test.js
@@ -231,2 +231,15 @@ import test from 'ava' | ||
test('space sorts responsive directional margins', t => { | ||
const a = space({ | ||
mb: 2, | ||
m: [0, 1] | ||
}) | ||
const keys = Object.keys(a) | ||
t.deepEqual(keys, [ | ||
'margin', | ||
'@media screen and (min-width: 40em)', | ||
'marginBottom' | ||
]) | ||
}) | ||
test('space returns padding declarations', t => { | ||
@@ -233,0 +246,0 @@ const dec = space({p: 1}) |
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
33722
963