@@ -64,7 +64,10 @@ export const prop = (key) => (props) => {
64
64
return value ;
65
65
} ;
66
66
67
- export default {
67
+ export const extend = ( baseTheme , modifications ) =>
68
+ lodash . merge ( lodash . cloneDeep ( baseTheme ) , modifications ) ;
69
+
70
+ const baseThemes = {
68
71
[ Theme . light ] : {
69
72
colors,
70
73
...common ,
@@ -228,35 +231,23 @@ export default {
228
231
Policy : {
229
232
link : colors . processingBlueLight
230
233
}
231
- } ,
232
- [ Theme . contrast ] : {
233
- colors,
234
- ...common ,
235
- primaryTextColor : grays . lightest ,
234
+ }
235
+ } ;
236
+
237
+ export default {
238
+ ...baseThemes ,
239
+ [ Theme . contrast ] : extend ( baseThemes [ Theme . dark ] , {
236
240
inactiveTextColor : grays . light ,
237
- backgroundColor : grays . darker ,
238
241
239
242
Button : {
240
243
primary : {
241
- default : {
242
- foreground : grays . light ,
243
- background : grays . dark ,
244
- border : grays . middleDark
245
- } ,
246
244
hover : {
247
245
foreground : grays . dark ,
248
246
background : colors . yellow ,
249
247
border : colors . yellow
250
248
} ,
251
249
active : {
252
- foreground : grays . dark ,
253
- background : colors . p5jsActivePink ,
254
- border : colors . p5jsActivePink
255
- } ,
256
- disabled : {
257
- foreground : grays . light ,
258
- background : grays . dark ,
259
- border : grays . middleDark
250
+ foreground : grays . dark
260
251
}
261
252
} ,
262
253
secondary : {
@@ -271,44 +262,20 @@ export default {
271
262
border : colors . yellow
272
263
} ,
273
264
active : {
274
- foreground : grays . dark ,
275
- background : colors . p5jsActivePink ,
276
- border : colors . p5jsActivePink
277
- } ,
278
- disabled : {
279
- foreground : grays . light ,
280
- background : grays . dark ,
281
- border : grays . middleDark
265
+ foreground : grays . dark
282
266
}
283
267
}
284
268
} ,
285
269
Icon : {
286
270
default : grays . mediumLight ,
287
271
hover : colors . yellow
288
272
} ,
289
- MobilePanel : {
290
- default : {
291
- foreground : grays . light ,
292
- background : grays . dark ,
293
- border : grays . middleDark
294
- }
295
- } ,
296
273
Modal : {
297
- background : grays . dark ,
298
- border : grays . middleDark ,
299
274
separator : grays . light
300
275
} ,
301
- Separator : grays . middleDark ,
302
-
303
276
TabHighlight : grays . darker ,
304
277
SketchList : {
305
- background : colors . yellow ,
306
- card : {
307
- background : grays . dark
308
- }
309
- } ,
310
- Policy : {
311
- link : colors . processingBlueLight
278
+ background : colors . yellow
312
279
}
313
- }
280
+ } )
314
281
} ;
0 commit comments