tooltip.ts

 1import { useTheme } from "../theme"
 2import { background, border, text } from "./components"
 3
 4export default function tooltip(): any {
 5    const theme = useTheme()
 6
 7    return {
 8        background: background(theme.middle),
 9        border: border(theme.middle),
10        padding: { top: 4, bottom: 4, left: 8, right: 8 },
11        margin: { top: 6, left: 6 },
12        shadow: theme.popover_shadow,
13        corner_radius: 6,
14        text: text(theme.middle, "sans", { size: "xs" }),
15        keystroke: {
16            background: background(theme.middle, "on"),
17            corner_radius: 4,
18            margin: { left: 6 },
19            padding: { left: 4, right: 4 },
20            ...text(theme.middle, "mono", "on", { size: "xs", weight: "bold" }),
21        },
22        max_text_width: 200,
23    }
24}