Skip to content

Commit 041b97f

Browse files
committed
Add missing shadowOpacity prop
1 parent 6e098e5 commit 041b97f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/index.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ describe("misc", () => {
247247
shadowColor: "#fff",
248248
shadowOffset: { height: 20, width: 10 },
249249
shadowRadius: 30,
250+
shadowOpacity: 1,
250251
},
251252
container: {
252253
paddingBottom: 30,
@@ -1181,6 +1182,7 @@ describe("box-shadow", () => {
11811182
shadowOffset: { width: 10, height: 20 },
11821183
shadowRadius: 30,
11831184
shadowColor: "red",
1185+
shadowOpacity: 1,
11841186
},
11851187
});
11861188
expect(
@@ -1194,6 +1196,7 @@ describe("box-shadow", () => {
11941196
shadowOffset: { width: 10, height: 20 },
11951197
shadowRadius: 30,
11961198
shadowColor: "#f00",
1199+
shadowOpacity: 1,
11971200
},
11981201
});
11991202
});
@@ -1210,6 +1213,7 @@ describe("box-shadow", () => {
12101213
shadowOffset: { width: 10, height: 20 },
12111214
shadowRadius: 30,
12121215
shadowColor: "rgb(100, 100, 100)",
1216+
shadowOpacity: 1,
12131217
},
12141218
});
12151219
});
@@ -1226,6 +1230,7 @@ describe("box-shadow", () => {
12261230
shadowOffset: { width: 10, height: 20 },
12271231
shadowRadius: 30,
12281232
shadowColor: "rgba(100, 100, 100, 0.5)",
1233+
shadowOpacity: 1,
12291234
},
12301235
});
12311236
});
@@ -1242,6 +1247,7 @@ describe("box-shadow", () => {
12421247
shadowOffset: { width: 10, height: 20 },
12431248
shadowRadius: 30,
12441249
shadowColor: "#f00",
1250+
shadowOpacity: 1,
12451251
},
12461252
});
12471253
});
@@ -1258,6 +1264,7 @@ describe("box-shadow", () => {
12581264
shadowOffset: { width: 0, height: 0 },
12591265
shadowRadius: 1,
12601266
shadowColor: "red",
1267+
shadowOpacity: 1,
12611268
},
12621269
});
12631270
expect(
@@ -1271,6 +1278,7 @@ describe("box-shadow", () => {
12711278
shadowOffset: { width: 0, height: 0 },
12721279
shadowRadius: 0,
12731280
shadowColor: "red",
1281+
shadowOpacity: 1,
12741282
},
12751283
});
12761284
expect(
@@ -1284,6 +1292,7 @@ describe("box-shadow", () => {
12841292
shadowOffset: { width: 1, height: 1 },
12851293
shadowRadius: 0,
12861294
shadowColor: "#00f",
1295+
shadowOpacity: 1,
12871296
},
12881297
});
12891298
});
@@ -1300,6 +1309,7 @@ describe("box-shadow", () => {
13001309
shadowOffset: { width: 10, height: 20 },
13011310
shadowRadius: 0,
13021311
shadowColor: "red",
1312+
shadowOpacity: 1,
13031313
},
13041314
});
13051315
});
@@ -1316,6 +1326,7 @@ describe("box-shadow", () => {
13161326
shadowOffset: { width: 10, height: 20 },
13171327
shadowRadius: 30,
13181328
shadowColor: "black",
1329+
shadowOpacity: 1,
13191330
},
13201331
});
13211332
});
@@ -1332,6 +1343,7 @@ describe("box-shadow", () => {
13321343
shadowOffset: { width: 10, height: 20 },
13331344
shadowRadius: 0,
13341345
shadowColor: "black",
1346+
shadowOpacity: 1,
13351347
},
13361348
});
13371349
});
@@ -1425,6 +1437,7 @@ describe("rem unit", () => {
14251437
shadowColor: "#fff",
14261438
shadowOffset: { height: 32, width: 16 },
14271439
shadowRadius: 48,
1440+
shadowOpacity: 1,
14281441
},
14291442
});
14301443
});

src/transforms/boxShadow.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ export const boxShadowToShadowProps = value => {
3737
shadowOffset: { width: offsetX, height: offsetY },
3838
shadowRadius: blurRadius !== undefined ? blurRadius : 0,
3939
shadowColor: color !== undefined ? color : "black",
40+
shadowOpacity: 1,
4041
};
4142
};

0 commit comments

Comments
 (0)