1 | /// <reference types="react" />
|
2 | import type { DefaultPopoverTargetHTMLProps, Popover, PopoverProps } from "@blueprintjs/core";
|
3 | /**
|
4 | * Reusable collection of props for components in this package which render a `Popover`
|
5 | * and need to provide some degree of customization for that popover.
|
6 | */
|
7 | export interface SelectPopoverProps {
|
8 | /**
|
9 | * HTML attributes to spread to the popover content container element.
|
10 | */
|
11 | popoverContentProps?: React.HTMLAttributes<HTMLDivElement>;
|
12 | /**
|
13 | * Props to spread to the popover.
|
14 | *
|
15 | * Note that `content` cannot be changed, but you may apply some props to the content wrapper element
|
16 | * with `popoverContentProps`. Likewise, `targetProps` is no longer supported as it was in Blueprint v4, but you
|
17 | * may use `popoverTargetProps` instead.
|
18 | *
|
19 | * N.B. `disabled` is supported here, as this can be distinct from disabling the entire select button / input
|
20 | * control element. There are some cases where we only want to disable the popover interaction.
|
21 | */
|
22 | popoverProps?: Partial<Omit<PopoverProps, "content" | "defaultIsOpen" | "fill" | "renderTarget">>;
|
23 | /**
|
24 | * Optional ref for the Popover component instance.
|
25 | * This is sometimes useful to reposition the popover.
|
26 | *
|
27 | * Note that this is defined as a specific kind of Popover instance which should be compatible with
|
28 | * most use cases, since it uses the default target props interface.
|
29 | */
|
30 | popoverRef?: React.RefObject<Popover<DefaultPopoverTargetHTMLProps>>;
|
31 | /**
|
32 | * HTML attributes to add to the popover target element.
|
33 | */
|
34 | popoverTargetProps?: React.HTMLAttributes<HTMLElement>;
|
35 | }
|