forked from primer/react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.ts
101 lines (95 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import {theme} from './theme-preval'
import {KeyPaths} from './utils/types/KeyPaths'
export default theme
// NOTE: for now, ThemeColors and ThemeShadows are handcrafted types. It would be nice if these
// were exports from primitives (or a different shape but derived from those exports).
type ThemeColors = {
fg: {
default: string
muted: string
subtle: string
onEmphasis: string
}
canvas: {
default: string
overlay: string
inset: string
subtle: string
}
border: {
default: string
muted: string
subtle: string
}
// Roles
neutral: {
emphasisPlus: string
emphasis: string
muted: string
subtle: string
}
accent: {
fg: string
emphasis: string
muted: string
subtle: string
}
success: {
fg: string
emphasis: string
muted: string
subtle: string
}
attention: {
fg: string
emphasis: string
muted: string
subtle: string
}
severe: {
fg: string
emphasis: string
muted: string
subtle: string
}
danger: {
fg: string
emphasis: string
muted: string
subtle: string
}
open: {
fg: string
emphasis: string
muted: string
subtle: string
}
closed: {
fg: string
emphasis: string
muted: string
subtle: string
}
done: {
fg: string
emphasis: string
muted: string
subtle: string
}
sponsors: {
fg: string
emphasis: string
muted: string
subtle: string
}
}
type ThemeShadows = {
shadow: {
small: string
medium: string
large: string
extraLarge: string
}
}
export type ThemeColorPaths = KeyPaths<ThemeColors>
export type ThemeShadowPaths = KeyPaths<ThemeShadows>