shelving
Version:
Toolkit for using data in JavaScript.
17 lines (16 loc) • 1.02 kB
TypeScript
/** biome-ignore-all lint/a11y/noStaticElementInteractions: This is fine we're only using this to listen for clicks on child buttons. */
/** biome-ignore-all lint/a11y/useKeyWithClickEvents: This is fine we're only using this to listen for clicks on child buttons. */
import { type ReactElement } from "react";
import type { InputProps } from "./Input.js";
import { type PopoverChildren } from "./Popover.js";
export interface ButtonInputPopoverProps extends InputProps {
children: PopoverChildren;
}
/**
* An input button that, when clicked, shows a popover next to it when clicked or focused.
* - The first element passed to `children` is 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.
*/
export declare function ButtonInputPopover({ children: [buttonChildren, ...popoverChildren], //
...props }: ButtonInputPopoverProps): ReactElement;