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: 24,
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, "muted"),
21    hoveredEntry: entry(
22      theme,
23      "primary",
24      backgroundColor(theme, 300, "hovered")
25    ),
26    selectedEntry: entry(theme, "primary"),
27    hoveredSelectedEntry: entry(
28      theme,
29      "active",
30      backgroundColor(theme, 300, "hovered")
31    ),
32    padding: { left: 12, right: 12, top: 6, bottom: 6 },
33  };
34}