@cryptic-css/prop-mq
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -6,6 +6,8 @@ # Change Log | ||
## [3.0.1](https://github.com/wintercounter/ccss/compare/v3.0.0...v3.0.1) (2020-03-17) | ||
**Note:** Version bump only for package @cryptic-css/prop-mq | ||
### Bug Fixes | ||
* **prop-mq:** stop using original reference ([53514b0](https://github.com/wintercounter/ccss/commit/53514b01a92c08421a56922c9c96e24a0b795a8c)) | ||
@@ -15,2 +17,3 @@ | ||
# [3.0.0](https://github.com/wintercounter/ccss/compare/v1.0.1...v3.0.0) (2020-03-11) | ||
@@ -17,0 +20,0 @@ |
@@ -10,10 +10,13 @@ import { mediaQuery } from '@w11r/use-breakpoint'; | ||
input = [input]; | ||
} | ||
} // We need new array references to avoid mutating the original src | ||
for (const bpv of input) { | ||
bpv[1] = options.__ccss(bpv[1]); | ||
const generated = []; | ||
for (let i = 0; i < input.length; i++) { | ||
generated[i] = [input[i][0], options.__ccss(input[i][1])]; | ||
} | ||
return mediaQuery(input, options.outputTransformer.type); | ||
return mediaQuery(generated, options.outputTransformer.type); | ||
}; | ||
}); |
{ | ||
"name": "@cryptic-css/prop-mq", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Adds support for the `mq` prop to write media queries using `@w11r/use-breakpoint`.", | ||
@@ -32,5 +32,5 @@ "author": "Victor Vincent <wintercounter+ccss@gmail.com>", | ||
"devDependencies": { | ||
"@cryptic-css/core": "^3.0.0" | ||
"@cryptic-css/core": "^3.0.1" | ||
}, | ||
"gitHead": "046c392acedba4e324349ebfa140f3c10721a226" | ||
} |
@@ -8,7 +8,10 @@ import { mediaQuery } from '@w11r/use-breakpoint' | ||
} | ||
for (const bpv of input) { | ||
bpv[1] = options.__ccss(bpv[1]) | ||
// We need new array references to avoid mutating the original src | ||
const generated: [string, {}][] = [] | ||
for (let i = 0; i < input.length; i++) { | ||
generated[i] = [input[i][0], options.__ccss(input[i][1])] | ||
} | ||
return mediaQuery(input, options.outputTransformer.type) | ||
return mediaQuery(generated, options.outputTransformer.type) | ||
} | ||
} |
9023
159