projectPanel.ts

 1import Theme from "../themes/theme";
 2import { Color } from "../utils/color";
 3import { panel } from "./app";
 4import { backgroundColor, iconColor, text, TextColor } from "./components";
 5
 6export default function projectPanel(theme: Theme) {
 7  function entry(theme: Theme, textColor: TextColor, background?: Color) {
 8    return {
 9      height: 22,
10      background,
11      iconColor: iconColor(theme, "muted"),
12      iconSize: 8,
13      iconSpacing: 8,
14      text: text(theme, "mono", textColor, { size: "sm" }),
15    };
16  }
17
18  return {
19    ...panel,
20    entry: entry(theme, "secondary"),
21    hoveredEntry: entry(
22      theme,
23      "secondary",
24      backgroundColor(theme, 300, "hovered")
25    ),
26    selectedEntry: entry(theme, "primary"),
27    hoveredSelectedEntry: entry(
28      theme,
29      "primary",
30      backgroundColor(theme, 300, "hovered")
31    ),
32    padding: {
33      top: 6,
34      left: 12,
35    },
36  };
37}