1import { ColorScheme } from "../themes/common/colorScheme"
2import { background, border, text } from "./components"
3
4export default function tooltip(colorScheme: ColorScheme) {
5 let layer = colorScheme.middle
6 return {
7 background: background(layer),
8 border: border(layer),
9 padding: { top: 4, bottom: 4, left: 8, right: 8 },
10 margin: { top: 6, left: 6 },
11 shadow: colorScheme.popoverShadow,
12 cornerRadius: 6,
13 text: text(layer, "sans", { size: "xs" }),
14 keystroke: {
15 background: background(layer, "on"),
16 cornerRadius: 4,
17 margin: { left: 6 },
18 padding: { left: 4, right: 4 },
19 ...text(layer, "mono", "on", { size: "xs", weight: "bold" }),
20 },
21 maxTextWidth: 200,
22 }
23}