This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
theme.ts
74 lines (67 loc) · 1.67 KB
/
theme.ts
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
const size = {
mobileS: '320px',
mobileM: '375px',
mobileL: '425px',
tablet: '768px',
laptop: '1024px',
laptopL: '1440px',
desktop: '2560px',
};
const colors = {
skyBlue: '#069ccd',
whiteGray: '#f7f6f3',
dusk: 'rgb(65,77,107)',
green: 'rgb(29,211,168)',
greenBlue: 'rgb(36,205,151)',
mediumGray: 'rgb(134,154,183)',
paleGray: 'rgb(221,226,236)',
lightBackground: 'white',
lightBackgroundLight: '#f7f6f3',
darkBackground: '#323739',
darkBackgroundLight: '#393241',
};
const light = {
background: `linear-gradient(
to bottom right,
${colors.lightBackground},
${colors.lightBackgroundLight})`,
btnPrimary: colors.skyBlue,
btnPrimaryFont: 'white',
btnPrimaryLight: colors.whiteGray,
btnPrimaryLightFont: 'black',
text: 'black',
};
export type DoobooTheme = typeof light;
const dark: DoobooTheme = {
background: `linear-gradient(
to bottom right,
${colors.darkBackground},
${colors.darkBackgroundLight})`,
btnPrimary: colors.skyBlue,
btnPrimaryFont: 'white',
btnPrimaryLight: colors.whiteGray,
btnPrimaryLightFont: 'black',
text: 'white',
};
const theme = {
light,
dark,
};
export const createTheme = (type = 'light'): DoobooTheme => {
switch (type) {
case 'dark':
return theme.dark;
default:
return theme.light;
}
};
export const device = {
mobileS: `(min-width: ${size.mobileS})`,
mobileM: `(min-width: ${size.mobileM})`,
mobileL: `(min-width: ${size.mobileL})`,
tablet: `(min-width: ${size.tablet})`,
laptop: `(min-width: ${size.laptop})`,
laptopL: `(min-width: ${size.laptopL})`,
desktop: `(min-width: ${size.desktop})`,
desktopL: `(min-width: ${size.desktop})`,
};