-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy paththeme-config.js
More file actions
84 lines (82 loc) · 1.82 KB
/
theme-config.js
File metadata and controls
84 lines (82 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const appConfig = require('./config/app.json');
const { theme: { colors, variables = {} } = {} } = appConfig;
const {
light, dark, primary, accent,
} = colors;
/**
* Currently the SDK uses the theme-config to autogenerate some dynamic color properties like
* primaryContrast or accentContrast. To avoid breaking of this system, the required colors
* are taken from the app-config and injected here.
*/
/** @type {ThemeConfig} */
module.exports = {
colors: {
primary,
accent,
light,
dark,
/** Backward compatibility for newly added extension config values */
darkTransparent: 'rgba(0,0,0, 0.4)',
lightTransparent: 'rgba(255, 255, 255, 0.82)',
lightDark: '#323232',
overlay: '#f7f7f7',
lightOverlay: '#fafafa',
darkOverlay: '#f0f0f0',
gray: '#747474',
},
variables: {
gap: {
xsmall: 4,
small: 8,
big: 16,
bigger: 20,
xbig: 32,
xxbig: 64,
},
emptyPage: {
icon: 216,
titleTopGap: 36,
buttonVerticalGap: 24,
},
navbar: {
height: 56,
},
toast: {
duration: 5000,
},
scroll: {
// Offset fo hiding elements when scrolling
hideOffset: 100,
},
navigator: {
height: 56,
},
filterbar: {
height: 48,
},
loadingIndicator: {
size: 32,
strokeWidth: 3,
imgSrc: null, // Use remote or data image src as loading indicator
...variables.loadingIndicator,
},
paymentBar: {
height: 78,
},
buttonBase: {
borderRadius: 2,
fontWeight: 500,
fontSize: 17,
padding: '8px 16px',
textTransform: 'uppercase',
},
discountBadgeBase: {
borderRadius: 2,
fontSize: '0.75rem',
},
/** @deprecated use ThemeColors.shade3 */
priceStrikedBase: {
color: '#9a9a9a',
},
},
};