mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
Fix DropdownMenuLabel: render plain div instead of Base UI GroupLabel
Base UI's Menu.GroupLabel requires a surrounding Menu.Group (unlike Radix's standalone Label), so using DropdownMenuLabel as a bare heading threw "MenuGroupContext is missing" at runtime. Render a <div> directly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -57,11 +57,14 @@ function DropdownMenuLabel({
|
||||
className,
|
||||
inset,
|
||||
...props
|
||||
}: MenuPrimitive.GroupLabel.Props & {
|
||||
}: React.ComponentProps<"div"> & {
|
||||
inset?: boolean
|
||||
}) {
|
||||
// Base UI's Menu.GroupLabel requires a surrounding Menu.Group (unlike Radix's
|
||||
// standalone Label). These menus use the label as a plain heading, so render a
|
||||
// <div> directly to avoid the "MenuGroupContext is missing" error.
|
||||
return (
|
||||
<MenuPrimitive.GroupLabel
|
||||
<div
|
||||
data-slot="dropdown-menu-label"
|
||||
data-inset={inset}
|
||||
className={cn(
|
||||
|
||||
Reference in New Issue
Block a user