update_notification.ts

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