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