-
Notifications
You must be signed in to change notification settings - Fork 490
/
Copy patheditor-styles.tsx
77 lines (73 loc) · 1.83 KB
/
editor-styles.tsx
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
export const styleMap = {
HIGHLIGHT: {
backgroundColor: "#faed27",
},
NORMAL: {
backgroundColor: "transparent",
},
BOLD: {
fontWeight: "bold",
},
};
export const styles = {
openai: {
transition: "background-color 0.2s ease-in-out",
backgroundColor: "#b9eebc",
padding: "2px 0",
},
huggingface_local: {
transition: "background-color 0.2s ease-in-out",
backgroundColor: "#f6b2b3",
padding: "2px 0",
},
cohere: {
transition: "background-color 0.2s ease-in-out",
backgroundColor: "#a198e6",
padding: "2px 0",
},
huggingface: {
transition: "background-color 0.2s ease-in-out",
backgroundColor: "#D7BCE8",
padding: "2px 0",
},
forefront: {
backgroundColor: "#BCCAE8",
padding: "2px 0",
},
anthropic: {
backgroundColor: "#cc785c80",
padding: "2px 0",
},
aleph_alpha: {
backgroundColor: "#e3ff00",
padding: "2px 0",
},
default: {
backgroundColor: "transparent",
transition: "background-color 0.2s ease-in-out",
padding: "2px 0",
},
};
export function getDecoratedStyle(provider: string, showHighlights: boolean) {
if (showHighlights === false) return styles.default;
switch (provider) {
case "openai":
return styles.openai;
case "huggingface-local":
return styles.huggingface_local;
case "llama-local":
return styles.huggingface_local;
case "cohere":
return styles.cohere;
case "huggingface":
return styles.huggingface;
case "forefront":
return styles.forefront;
case "anthropic":
return styles.anthropic;
case "aleph-alpha":
return styles.aleph_alpha;
default:
return styles.default;
}
}