@@ -15,40 +15,54 @@ export const common = {
15
15
16
16
export const remSize = size => `${ size / common . baseFontSize } rem` ;
17
17
18
- export const prop = key => props => props . theme [ key ] ;
18
+ export const prop = key => ( props ) => {
19
+ const value = props . theme [ key ] ;
20
+
21
+ if ( value == null ) {
22
+ throw new Error ( `themed prop ${ key } not found` ) ;
23
+ }
24
+
25
+ return value ;
26
+ } ;
19
27
20
28
export default {
21
29
[ Theme . light ] : {
22
30
colors,
23
31
...common ,
24
32
primaryTextColor : '#333' ,
25
33
26
- buttonColor : '#f10046 ' ,
27
- buttonColorBackground : '#fff ' ,
34
+ buttonColor : '#000 ' ,
35
+ buttonColorBackground : '#f4f4f4 ' ,
28
36
buttonBorderColor : '#b5b5b5' ,
29
37
buttonHoverColor : '#fff' ,
30
38
buttonHoverColorBackground : colors . p5pink ,
39
+ buttonDisabledColor : '#f10046' ,
40
+ buttonDisabledColorBackground : '#fff' ,
31
41
} ,
32
42
[ Theme . dark ] : {
33
43
colors,
34
44
...common ,
35
45
primaryTextColor : '#FFF' ,
36
46
37
- buttonColor : '#f10046 ' ,
38
- buttonColorBackground : '#fff ' ,
47
+ buttonColor : '#000 ' ,
48
+ buttonColorBackground : '#f4f4f4 ' ,
39
49
buttonBorderColor : '#b5b5b5' ,
40
50
buttonHoverColor : '#fff' ,
41
51
buttonHoverColorBackground : colors . p5pink ,
52
+ buttonDisabledColor : '#f10046' ,
53
+ buttonDisabledColorBackground : '#fff' ,
42
54
} ,
43
55
[ Theme . contrast ] : {
44
56
colors,
45
57
...common ,
46
58
primaryTextColor : '#F5DC23' ,
47
59
48
- buttonColor : '#333 ' ,
60
+ buttonColor : '#000 ' ,
49
61
buttonColorBackground : colors . yellow ,
50
62
buttonBorderColor : '#b5b5b5' ,
51
63
buttonHoverColor : '#333' ,
52
64
buttonHoverColorBackground : '#fff' ,
65
+ buttonDisabledColor : '#333' ,
66
+ buttonDisabledColorBackground : colors . yellow ,
53
67
} ,
54
68
} ;
0 commit comments