ButtonPopover()function
ButtonPopover({
children: [buttonChildren, ...popoverChildren], //
...props
}: ButtonPopoverProps): ReactElement| Param | Type | |
|---|---|---|
props | ButtonPopoverProps | Props for ButtonPopover, a button that toggles an adjacent popover. required |
.children | PopoverChildren | Children tuple for Popover: a leading trigger node followed by the popover's contents. required |
A button that, when clicked, shows a popover next to it when clicked or focused.
- The first element passed to
childrenis used as the content for the button, the rest is the content of the popover.
DH: Would love to use new HTML popover="auto" functionality for this but the anchor positioning it needs is not supported everywhere yet.
Examples
<ButtonPopover>{label}{panel}</ButtonPopover>