@@ -15,40 +15,54 @@ export const common = {
1515
1616export const remSize = size => `${ size / common . baseFontSize } rem` ;
1717
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+ } ;
1927
2028export default {
2129 [ Theme . light ] : {
2230 colors,
2331 ...common ,
2432 primaryTextColor : '#333' ,
2533
26- buttonColor : '#f10046 ' ,
27- buttonColorBackground : '#fff ' ,
34+ buttonColor : '#000 ' ,
35+ buttonColorBackground : '#f4f4f4 ' ,
2836 buttonBorderColor : '#b5b5b5' ,
2937 buttonHoverColor : '#fff' ,
3038 buttonHoverColorBackground : colors . p5pink ,
39+ buttonDisabledColor : '#f10046' ,
40+ buttonDisabledColorBackground : '#fff' ,
3141 } ,
3242 [ Theme . dark ] : {
3343 colors,
3444 ...common ,
3545 primaryTextColor : '#FFF' ,
3646
37- buttonColor : '#f10046 ' ,
38- buttonColorBackground : '#fff ' ,
47+ buttonColor : '#000 ' ,
48+ buttonColorBackground : '#f4f4f4 ' ,
3949 buttonBorderColor : '#b5b5b5' ,
4050 buttonHoverColor : '#fff' ,
4151 buttonHoverColorBackground : colors . p5pink ,
52+ buttonDisabledColor : '#f10046' ,
53+ buttonDisabledColorBackground : '#fff' ,
4254 } ,
4355 [ Theme . contrast ] : {
4456 colors,
4557 ...common ,
4658 primaryTextColor : '#F5DC23' ,
4759
48- buttonColor : '#333 ' ,
60+ buttonColor : '#000 ' ,
4961 buttonColorBackground : colors . yellow ,
5062 buttonBorderColor : '#b5b5b5' ,
5163 buttonHoverColor : '#333' ,
5264 buttonHoverColorBackground : '#fff' ,
65+ buttonDisabledColor : '#333' ,
66+ buttonDisabledColorBackground : colors . yellow ,
5367 } ,
5468} ;
0 commit comments