Namespace the subtree theme scopes as .theme-light/.theme-dark: dark: follows the nearest scope, portalled dashboard menus and tooltips restate it

This commit is contained in:
2026-10-15 17:42:59 +02:00
parent 1b5a16f636
commit 44c665b3a5
14 changed files with 78 additions and 47 deletions
@@ -154,8 +154,9 @@ export function Select({
onChange,
}: SelectProps) {
// The menu is portalled to `body`, which is outside the canvas — so it
// re-states the dashboard's own colours rather than borrowing the app's.
const { style } = useLook()
// re-states the dashboard's own theme and colours rather than borrowing the
// app's.
const { style, theme } = useLook()
return (
<SelectPrimitive.Root
value={value}
@@ -178,7 +179,10 @@ export function Select({
position="popper"
sideOffset={4}
style={style}
className="fx-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0"
className={cn(
theme,
"fx-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0",
)}
>
<SelectPrimitive.Viewport>
{options.map((option) => (