Skip to content

An open-source, self-hosted system for apps built with web technologies.

Use Surface for Start Menu content

zohayrslileh388f503c0833
diff --git a/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx b/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx
index fc00b1c..51d29ce 100644
--- a/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx
+++ b/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx
@@ -1,7 +1,7 @@
import { ComponentProps, ReactNode, useCallback, useEffect, useId, useRef, useState } from "react"
import { enterSurface, prepareSurfaceEntrance, restSurface } from "../../../../appearance/surface-presence"
import { useReducedMotion } from "@libs/react-motion"
-import { useAppearance, useResolveTheme, useScale } from "@phreshos/react-ui"
+import { Surface, useAppearance, useResolveTheme, useScale } from "@phreshos/react-ui"
import TaskbarSurface, { taskbarSurfaceClassName } from "../taskbar-surface"
import TaskbarButton from "../taskbar-button"
@@ -116,9 +116,13 @@ export default function ({ label, trigger, children, className, style, ...props
>
- <TaskbarSurface label={label} labelId={`${id}-label`}>
+ <TaskbarSurface label={label} labelId={`${id}-label`} contentClassName="">
- {children(close)}
+ <Surface opacity="small" className="min-h-0 max-h-[inherit] rounded-[inherit]">
+
+ {children(close)}
+
+ </Surface>
</TaskbarSurface>
diff --git a/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx b/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx
index cf3c36f..143ae76 100644
--- a/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx
+++ b/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx
@@ -4,7 +4,7 @@ import { Surface, useAppearance, useResolveTheme, useScale } from "@phreshos/rea
/** The window-material shell shared by surfaces opened from the taskbar. */
export const taskbarSurfaceClassName = "m-0 isolate border-0 bg-transparent p-0 shadow-window-active outline-none"
-export default function TaskbarSurface({ label, labelId, children }: TaskbarSurfaceProps) {
+export default function TaskbarSurface({ label, labelId, contentClassName = "bg-white/25 shadow-window-content", children }: TaskbarSurfaceProps) {
const contentRadius = useScale(useResolveTheme(useAppearance().radius)).medium
@@ -12,7 +12,7 @@ export default function TaskbarSurface({ label, labelId, children }: TaskbarSurf
<h2 id={labelId} className="relative grid h-10 items-center px-3.5 text-window-title font-medium select-none">{label}</h2>
- <div style={{ borderRadius: contentRadius }} className="relative m-1.5 mt-0 min-h-0 overflow-hidden bg-white/25 shadow-window-content">
+ <div style={{ borderRadius: contentRadius }} className={`relative m-1.5 mt-0 min-h-0 overflow-hidden ${contentClassName}`}>
{children}
@@ -27,5 +27,7 @@ interface TaskbarSurfaceProps {
labelId: string
+ contentClassName?: string
+
children: ReactNode
}