@@ -2,55 +2,57 @@ import {ShadowStyleIOS} from 'react-native';
2
2
import _ from 'lodash' ;
3
3
import Colors from './colors' ;
4
4
5
- type Shadow = { top ?: ShadowStyleIOS , bottom ?: ShadowStyleIOS } & ShadowStyleIOS ;
5
+ type Shadow = { top ?: ShadowStyleIOS ; bottom ?: ShadowStyleIOS } & ShadowStyleIOS ;
6
+
7
+ const isDark = Colors . getScheme ( ) === 'dark' ;
6
8
7
9
const Shadows = {
8
10
sh10 : {
9
11
top : {
10
- shadowColor : Colors . grey40 ,
12
+ shadowColor : isDark ? 'transparent' : Colors . grey40 ,
11
13
shadowOpacity : 0.18 ,
12
14
shadowRadius : 5 ,
13
15
shadowOffset : { height : - 1 , width : 0 } ,
14
- elevation : 2
16
+ elevation : isDark ? 0 : 2
15
17
} ,
16
18
bottom : {
17
- shadowColor : Colors . grey40 ,
19
+ shadowColor : isDark ? 'transparent' : Colors . grey40 ,
18
20
shadowOpacity : 0.18 ,
19
21
shadowRadius : 5 ,
20
22
shadowOffset : { height : 1 , width : 0 } ,
21
- elevation : 2
23
+ elevation : isDark ? 0 : 2
22
24
}
23
25
} ,
24
26
sh20 : {
25
27
top : {
26
- shadowColor : Colors . grey30 ,
28
+ shadowColor : isDark ? 'transparent' : Colors . grey30 ,
27
29
shadowOpacity : 0.2 ,
28
30
shadowRadius : 10 ,
29
31
shadowOffset : { height : - 2 , width : 0 } ,
30
- elevation : 3
32
+ elevation : isDark ? 0 : 3
31
33
} ,
32
34
bottom : {
33
- shadowColor : Colors . grey30 ,
35
+ shadowColor : isDark ? 'transparent' : Colors . grey30 ,
34
36
shadowOpacity : 0.2 ,
35
37
shadowRadius : 10 ,
36
38
shadowOffset : { height : 2 , width : 0 } ,
37
- elevation : 3
39
+ elevation : isDark ? 0 : 3
38
40
}
39
41
} ,
40
42
sh30 : {
41
43
top : {
42
- shadowColor : Colors . grey30 ,
44
+ shadowColor : isDark ? 'transparent' : Colors . grey30 ,
43
45
shadowOpacity : 0.2 ,
44
46
shadowRadius : 12 ,
45
47
shadowOffset : { height : - 5 , width : 0 } ,
46
- elevation : 4
48
+ elevation : isDark ? 0 : 4
47
49
} ,
48
50
bottom : {
49
- shadowColor : Colors . grey30 ,
51
+ shadowColor : isDark ? 'transparent' : Colors . grey30 ,
50
52
shadowOpacity : 0.2 ,
51
53
shadowRadius : 12 ,
52
54
shadowOffset : { height : 5 , width : 0 } ,
53
- elevation : 4
55
+ elevation : isDark ? 0 : 4
54
56
}
55
57
} ,
56
58
/* Old Presets */
0 commit comments