Skip to content

Commit e8e43ea

Browse files
authored
Add our private shadows presets in OS (#1157)
1 parent 52aef1d commit e8e43ea

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

generatedTypes/style/shadows.d.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,72 @@ declare type Shadow = {
44
bottom?: ShadowStyleIOS;
55
} & ShadowStyleIOS;
66
declare const _default: {
7+
sh10: {
8+
top: {
9+
shadowColor: string;
10+
shadowOpacity: number;
11+
shadowRadius: number;
12+
shadowOffset: {
13+
height: number;
14+
width: number;
15+
};
16+
elevation: number;
17+
};
18+
bottom: {
19+
shadowColor: string;
20+
shadowOpacity: number;
21+
shadowRadius: number;
22+
shadowOffset: {
23+
height: number;
24+
width: number;
25+
};
26+
elevation: number;
27+
};
28+
};
29+
sh20: {
30+
top: {
31+
shadowColor: string;
32+
shadowOpacity: number;
33+
shadowRadius: number;
34+
shadowOffset: {
35+
height: number;
36+
width: number;
37+
};
38+
elevation: number;
39+
};
40+
bottom: {
41+
shadowColor: string;
42+
shadowOpacity: number;
43+
shadowRadius: number;
44+
shadowOffset: {
45+
height: number;
46+
width: number;
47+
};
48+
elevation: number;
49+
};
50+
};
51+
sh30: {
52+
top: {
53+
shadowColor: string;
54+
shadowOpacity: number;
55+
shadowRadius: number;
56+
shadowOffset: {
57+
height: number;
58+
width: number;
59+
};
60+
elevation: number;
61+
};
62+
bottom: {
63+
shadowColor: string;
64+
shadowOpacity: number;
65+
shadowRadius: number;
66+
shadowOffset: {
67+
height: number;
68+
width: number;
69+
};
70+
elevation: number;
71+
};
72+
};
773
white10: {
874
top: {
975
shadowColor: string;

src/style/shadows.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,55 @@ import Colors from './colors';
55
type Shadow = {top?: ShadowStyleIOS, bottom?: ShadowStyleIOS} & ShadowStyleIOS;
66

77
const Shadows = {
8+
sh10: {
9+
top: {
10+
shadowColor: Colors.grey40,
11+
shadowOpacity: 0.18,
12+
shadowRadius: 5,
13+
shadowOffset: {height: -1, width: 0},
14+
elevation: 2
15+
},
16+
bottom: {
17+
shadowColor: Colors.grey40,
18+
shadowOpacity: 0.18,
19+
shadowRadius: 5,
20+
shadowOffset: {height: 1, width: 0},
21+
elevation: 2
22+
}
23+
},
24+
sh20: {
25+
top: {
26+
shadowColor: Colors.grey30,
27+
shadowOpacity: 0.2,
28+
shadowRadius: 10,
29+
shadowOffset: {height: -2, width: 0},
30+
elevation: 3
31+
},
32+
bottom: {
33+
shadowColor: Colors.grey30,
34+
shadowOpacity: 0.2,
35+
shadowRadius: 10,
36+
shadowOffset: {height: 2, width: 0},
37+
elevation: 3
38+
}
39+
},
40+
sh30: {
41+
top: {
42+
shadowColor: Colors.grey30,
43+
shadowOpacity: 0.2,
44+
shadowRadius: 12,
45+
shadowOffset: {height: -5, width: 0},
46+
elevation: 4
47+
},
48+
bottom: {
49+
shadowColor: Colors.grey30,
50+
shadowOpacity: 0.2,
51+
shadowRadius: 12,
52+
shadowOffset: {height: 5, width: 0},
53+
elevation: 4
54+
}
55+
},
56+
/* Old Presets */
857
white10: {
958
top: {shadowColor: Colors.dark20, shadowOpacity: 0.04, shadowRadius: 13.5},
1059
bottom: {shadowColor: Colors.dark10, shadowOpacity: 0.09, shadowRadius: 2, shadowOffset: {height: 2, width: 0}}

0 commit comments

Comments
 (0)