We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81a1398 commit dedfda6Copy full SHA for dedfda6
src/transforms/boxShadow.js
@@ -3,10 +3,13 @@ export const boxShadowToShadowProps = value => {
3
const nums = pxs
4
? pxs.map(val => val.replace("px", "")).map(val => Number(val))
5
: [];
6
- const [offsetX, offsetY, blurRadius] = nums;
7
- const [color] = pxs
+ const offsetX = nums[0];
+ const offsetY = nums[1];
8
+ const blurRadius = nums[2];
9
+ const filtered = pxs
10
? value.split(" ").filter(val => pxs.indexOf(val) === -1)
11
12
+ const color = filtered[0];
13
14
if (offsetX === undefined || offsetY === undefined) {
15
throw new Error(`Failed to parse declaration "boxShadow: ${value}"`);
0 commit comments