contactsPanel.ts

 1import Theme from "../themes/theme";
 2import { panel } from "./app";
 3import { backgroundColor, border, borderColor, player, text } from "./components";
 4
 5export default function(theme: Theme) {
 6  const project = {
 7    guestAvatarSpacing: 4,
 8    height: 24,
 9    guestAvatar: {
10      cornerRadius: 8,
11      width: 14,
12    },
13    name: {
14      ...text(theme, "mono", "placeholder", { size: "sm" }),
15      margin: {
16        right: 6,
17      },
18    },
19    padding: {
20      left: 8,
21    },
22  };
23
24  const sharedProject = {
25    ...project,
26    background: backgroundColor(theme, 300),
27    cornerRadius: 6,
28    name: {
29      ...project.name,
30      ...text(theme, "mono", "secondary", { size: "sm" }),
31    },
32  };
33
34  return {
35    ...panel,
36    userQueryEditor: {
37      background: backgroundColor(theme, 500),
38      cornerRadius: 6,
39      text: text(theme, "mono", "primary"),
40      placeholderText: text(theme, "mono", "placeholder", { size: "sm" }),
41      selection: player(theme, 1).selection,
42      border: border(theme, "secondary"),
43      padding: {
44        bottom: 7,
45        left: 8,
46        right: 8,
47        top: 7,
48      },
49    },
50    rowHeight: 28,
51    treeBranchColor: borderColor(theme, "muted"),
52    treeBranchWidth: 1,
53    contactAvatar: {
54      cornerRadius: 10,
55      width: 18,
56    },
57    contactUsername: {
58      ...text(theme, "mono", "primary", { size: "sm" }),
59      padding: {
60        left: 8,
61      },
62    },
63    editContact: {
64      ...text(theme, "mono", "primary", { size: "sm" }),
65      background: backgroundColor(theme, 100),
66      cornerRadius: 12,
67      padding: { left: 7, right: 7 }
68    },
69    header: {
70      ...text(theme, "mono", "secondary", { size: "sm" }),
71      // padding: {
72      //   left: 8,
73      // }
74    },
75    project,
76    sharedProject,
77    hoveredSharedProject: {
78      ...sharedProject,
79      background: backgroundColor(theme, 300, "hovered"),
80      cornerRadius: 6,
81    },
82    unsharedProject: project,
83    hoveredUnsharedProject: {
84      ...project,
85      cornerRadius: 6,
86    },
87  }
88}