Display invite response buttons inline in notification panel

This commit is contained in:
Max Brunsfeld
2023-10-17 09:12:55 -07:00
parent c66385f0f9
commit f225039d36
19 changed files with 420 additions and 168 deletions
+2
View File
@@ -13,6 +13,7 @@ import project_shared_notification from "./project_shared_notification"
import tooltip from "./tooltip"
import terminal from "./terminal"
import chat_panel from "./chat_panel"
import notification_panel from "./notification_panel"
import collab_panel from "./collab_panel"
import toolbar_dropdown_menu from "./toolbar_dropdown_menu"
import incoming_call_notification from "./incoming_call_notification"
@@ -57,6 +58,7 @@ export default function app(): any {
assistant: assistant(),
feedback: feedback(),
chat_panel: chat_panel(),
notification_panel: notification_panel(),
component_test: component_test(),
}
}
@@ -0,0 +1,57 @@
import { background, text } from "./components"
import { icon_button } from "../component/icon_button"
import { useTheme } from "../theme"
import { interactive } from "../element"
export default function chat_panel(): any {
const theme = useTheme()
const layer = theme.middle
return {
background: background(layer),
avatar: {
icon_width: 24,
icon_height: 24,
corner_radius: 4,
outer_width: 24,
outer_corner_radius: 16,
},
read_text: text(layer, "sans", "base"),
unread_text: text(layer, "sans", "base"),
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"),
avatar_container: {
padding: {
right: 6,
left: 2,
top: 2,
bottom: 2,
}
},
list: {
},
icon_button: icon_button({
variant: "ghost",
color: "variant",
size: "sm",
}),
sign_in_prompt: {
default: text(layer, "sans", "base"),
}
}
}