@sanity/ui v0.33.11
Published: March 29, 2021
v0.33.11
Sanity UI
Most changes in this version are improvements and bug fixes behind the scenes – however there are a few new APIs:
New properties
- Introduced the
onItemSelectproperty ((index: number) => void) to theMenucomponent props, to make it possible to subscribe to whichMenuButtonis currently selected. - The
MenuItemnow takes theselectedproperty (boolean) to indicate which item in aMenushould be selected by default. - The
MenuButtoncomponent now takes thepopoverproperty (PopoverProps), which is an object containing properties for thePopovercomponent (likearrow,preventOverflow,portal, and so on). - The
Popovercomponent now takes amatchReferenceWidthproperty (boolean) to render the popover with same width as the referred element.