fix(admin): mount popover portal inside app container

Instead of mounting to body (which breaks scoped styles), we now
mount the popover portal to #woonoow-admin-app. This ensures
dropdowns inherit the correct CSS variables and styling.
This commit is contained in:
Dwindi Ramadhana
2026-01-07 23:40:03 +07:00
parent e66f260e75
commit a0e580878e
3 changed files with 1 additions and 69 deletions

View File

@@ -13,7 +13,7 @@ const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Portal container={document.getElementById("woonoow-admin-app")}>
<PopoverPrimitive.Content
ref={ref}
align={align}