v31.7.0
Minor Changes
-
MenuRenderer, OverflowMenu: Add menu
widthandplacementsupport (#1075)Provides a set of
widths to control how wide the menu is, wherecontentis the default. The available widths are ratioed off thecontentWidths specified on the theme.Additionally the
placementof the menu can choose from eithertoporbottomwhere the latter remains the default.EXAMPLE USAGE:
<MenuRenderer // ... width="small" placement="top" > ... </MenuRenderer>
-
MenuItem, MenuItemLink, MenuRenderer, OverflowMenu: Add
iconsupport (#1075)Provides a designed slot for adding an icon to
MenuItemandMenuItemLink. To compliment this we have introducedreserveIconSpaceon bothMenuRendererandOverflowMenuso the labels in menu items without icons align with the labels of menu items with an icon.EXAMPLE USAGE:
<MenuRenderer reserveIconSpace> <MenuItem // ... icon={<IconBookmark />} > Menu Item </MenuItem> </MenuRenderer>
-
MenuItem, MenuItemLink, MenuItemChecklist: Add
badgesupport (#1075)Provides a designed slot for adding a
Badgeto all the variants of a menu item.EXAMPLE USAGE:
<MenuRenderer> <MenuItem // ... badge={<Badge>Badge</Badge>} > Menu Item </MenuItem> </MenuRenderer>
Patch Changes
-
Button: Support using as menu trigger (#1075)
Allow a
Buttonto receive all of the required props for a menu trigger. As a result aButtonnow acceptsonKeyUp,onKeyDownandaria-haspopup.EXAMPLE USAGE:
<MenuRenderer trigger={triggerProps => <Button {...triggerProps}>Button</Button>} > ... </MenuRenderer>
-
Column: Enure inner element honours
componentprop (#1075)