Tweak notification styles
This commit is contained in:
parent
b090cefdde
commit
463b24949e
1 changed files with 19 additions and 24 deletions
|
@ -1,12 +1,22 @@
|
||||||
import { background, border, text } from "./components"
|
import { background, border, text } from "./components"
|
||||||
import { icon_button } from "../component/icon_button"
|
import { icon_button } from "../component/icon_button"
|
||||||
import { useTheme } from "../theme"
|
import { useTheme, with_opacity } from "../theme"
|
||||||
import { interactive } from "../element"
|
import { text_button } from "../component"
|
||||||
|
|
||||||
export default function (): any {
|
export default function (): any {
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
const layer = theme.middle
|
const layer = theme.middle
|
||||||
|
|
||||||
|
const notification_text = {
|
||||||
|
padding: { top: 4, bottom: 4 },
|
||||||
|
...text(layer, "sans", "base"),
|
||||||
|
}
|
||||||
|
|
||||||
|
const notification_read_text_color = with_opacity(
|
||||||
|
theme.middle.base.default.foreground,
|
||||||
|
0.6
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
background: background(layer),
|
background: background(layer),
|
||||||
avatar: {
|
avatar: {
|
||||||
|
@ -31,34 +41,19 @@ export default function (): any {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
read_text: {
|
read_text: {
|
||||||
padding: { top: 4, bottom: 4 },
|
...notification_text,
|
||||||
...text(layer, "sans", "disabled"),
|
color: notification_read_text_color,
|
||||||
},
|
},
|
||||||
unread_text: {
|
unread_text: notification_text,
|
||||||
padding: { top: 4, bottom: 4 },
|
button: text_button({
|
||||||
...text(layer, "sans", "base"),
|
variant: "ghost",
|
||||||
},
|
|
||||||
button: interactive({
|
|
||||||
base: {
|
|
||||||
...text(theme.lowest, "sans", "on", { size: "xs" }),
|
|
||||||
background: background(theme.lowest, "on"),
|
|
||||||
padding: 4,
|
|
||||||
corner_radius: 6,
|
|
||||||
margin: { left: 6 },
|
|
||||||
},
|
|
||||||
|
|
||||||
state: {
|
|
||||||
hovered: {
|
|
||||||
background: background(theme.lowest, "on", "hovered"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
timestamp: text(layer, "sans", "base", "disabled"),
|
timestamp: text(layer, "sans", "base", "disabled"),
|
||||||
avatar_container: {
|
avatar_container: {
|
||||||
padding: {
|
padding: {
|
||||||
right: 6,
|
right: 8,
|
||||||
left: 2,
|
left: 2,
|
||||||
top: 2,
|
top: 4,
|
||||||
bottom: 2,
|
bottom: 2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue