update_notification.ts

 1import { foreground, text } from "./components"
 2import { interactive } from "../element"
 3import { useTheme } from "../theme"
 4
 5export default function update_notification(): any {
 6    const theme = useTheme()
 7
 8    const header_padding = 8
 9
10    return {
11        message: {
12            ...text(theme.middle, "sans", { size: "xs" }),
13            margin: { left: header_padding, right: header_padding },
14        },
15        action_message: interactive({
16            base: {
17                ...text(theme.middle, "sans", { size: "xs" }),
18                margin: { left: header_padding, top: 6, bottom: 6 },
19            },
20            state: {
21                hovered: {
22                    color: foreground(theme.middle, "hovered"),
23                },
24            },
25        }),
26        dismiss_button: interactive({
27            base: {
28                color: foreground(theme.middle),
29                icon_width: 14,
30                icon_height: 14,
31                button_width: 14,
32                button_height: 14,
33            },
34            state: {
35                hovered: {
36                    color: foreground(theme.middle, "hovered"),
37                },
38            },
39        }),
40    }
41}