DropdownMenu group label style aligned with Select (WEB-1116)
Version: 0.6.0 ยท Type: ๐ Bug Fix
Problemโ
DropdownMenuLabel's style didn't match Select's grouped header:
| Property | Before | After (aligned with Select) |
|---|---|---|
| font-weight | font-semibold | font-normal |
| color | text-(--Labels-Secondary) | text-(--Labels-Tertiary) |
| padding | py-(--Spacing_8) (8px top and bottom) | pt-(--Spacing_8) (8px top only) |
Root cause: ui/dropdown-menu.tsx's DropdownMenuLabel carries shadcn's default py-1.5. The design layer didn't use unstyledVisual, so tailwind-merge only overrode pt and left the py-1.5 bottom half in place, producing an extra 6px of bottom padding.
Changed Filesโ
packages/design/src/components/DropdownMenu/styles.tspackages/design/src/components/DropdownMenu/DropdownMenu.tsxpackages/design/src/components/ui/dropdown-menu.tsx
Changesโ
DROPDOWN_LABEL_TOKEN_CLASS:py-(--Spacing_8)โpt-(--Spacing_8),font-semiboldโfont-normal,text-(--Labels-Secondary)โtext-(--Labels-Tertiary)ui/DropdownMenuLabelgains anunstyledVisual?: booleanprop that, whentrue, strips shadcn's default visual classes (px-2 py-1.5 text-sm font-semibold)- The design layer's
DropdownMenuLabelnow passesunstyledVisual, matching how Select handles the same primitive