1import Theme from "../themes/theme";
2import { backgroundColor, border, player, text } from "./components";
3
4export default function search(theme: Theme) {
5 const optionButton = {
6 ...text(theme, "mono", "secondary"),
7 background: backgroundColor(theme, "on500"),
8 cornerRadius: 4,
9 border: border(theme, "secondary"),
10 margin: {
11 left: 2,
12 right: 2,
13 },
14 padding: {
15 bottom: 3,
16 left: 8,
17 right: 8,
18 top: 3,
19 },
20 };
21
22 const editor = {
23 background: backgroundColor(theme, 500),
24 cornerRadius: 8,
25 minWidth: 200,
26 maxWidth: 500,
27 placeholderText: text(theme, "mono", "placeholder"),
28 selection: player(theme, 1).selection,
29 text: text(theme, "mono", "active"),
30 border: border(theme, "secondary"),
31 margin: {
32 right: 6,
33 },
34 padding: {
35 top: 3,
36 bottom: 3,
37 left: 12,
38 right: 8,
39 },
40 };
41
42 return {
43 matchBackground: theme.editor.highlight.match.value,
44 tabIconSpacing: 8,
45 tabIconWidth: 14,
46 activeHoveredOptionButton: {
47 ...optionButton,
48 ...text(theme, "mono", "active"),
49 background: backgroundColor(theme, "on500", "active"),
50 border: border(theme, "muted"),
51 },
52 activeOptionButton: {
53 ...optionButton,
54 ...text(theme, "mono", "active"),
55 background: backgroundColor(theme, "on500", "active"),
56 border: border(theme, "muted"),
57 },
58 editor,
59 hoveredOptionButton: {
60 ...optionButton,
61 ...text(theme, "mono", "active"),
62 border: border(theme, "muted"),
63 },
64 invalidEditor: {
65 ...editor,
66 border: border(theme, "error"),
67 },
68 matchIndex: {
69 ...text(theme, "mono", "muted"),
70 padding: 6,
71 },
72 optionButton,
73 optionButtonGroup: {
74 padding: {
75 left: 4,
76 right: 4,
77 },
78 },
79 resultsStatus: {
80 ...text(theme, "mono", "primary"),
81 size: 18,
82 },
83 };
84}