Set up vitest and add tests for interactive

This commit is contained in:
Nate Butler 2023-06-15 18:42:48 -04:00 committed by Mikayla Maki
parent 4bd89c4c8c
commit 5369f2c25a
No known key found for this signature in database
25 changed files with 4546 additions and 2163 deletions

View file

@ -1,39 +1,39 @@
import { ColorScheme } from "../theme/colorScheme"
import { foreground, text } from "./components"
import { interactive } from "./interactive"
import { interactive } from "../element/interactive"
const headerPadding = 8
export default function updateNotification(colorScheme: ColorScheme): Object {
let layer = colorScheme.middle
return {
message: {
...text(layer, "sans", { size: "xs" }),
margin: { left: headerPadding, right: headerPadding },
},
actionMessage: interactive({
base: {
...text(layer, "sans", { size: "xs" }),
margin: { left: headerPadding, top: 6, bottom: 6 }
}, state: {
hovered: {
color: foreground(layer, "hovered"),
}
}
}),
dismissButton: interactive({
base: {
color: foreground(layer),
iconWidth: 8,
iconHeight: 8,
buttonWidth: 8,
buttonHeight: 8
}, state: {
hovered: {
color: foreground(layer, "hovered"),
let layer = colorScheme.middle
return {
message: {
...text(layer, "sans", { size: "xs" }),
margin: { left: headerPadding, right: headerPadding },
},
},
})
actionMessage: interactive({
base: {
...text(layer, "sans", { size: "xs" }),
margin: { left: headerPadding, top: 6, bottom: 6 }
}, state: {
hovered: {
color: foreground(layer, "hovered"),
}
}
}),
dismissButton: interactive({
base: {
color: foreground(layer),
iconWidth: 8,
iconHeight: 8,
buttonWidth: 8,
buttonHeight: 8
}, state: {
hovered: {
color: foreground(layer, "hovered"),
},
},
})
}
}
}