1 | import * as React from "react";
|
2 | import { Boundary } from "../../common/boundary";
|
3 | import { Props } from "../../common/props";
|
4 | import { MenuItemProps } from "../menu/menuItem";
|
5 | import { IPopoverProps } from "../popover/popover";
|
6 | export declare type CollapsibleListProps = ICollapsibleListProps;
|
7 | /** @deprecated use CollapsibleListProps */
|
8 | export interface ICollapsibleListProps extends Props {
|
9 | /** Contents to collapse. */
|
10 | children: React.ReactNode;
|
11 | /**
|
12 | * Element to render as dropdown target with `CLICK` interaction to show collapsed menu.
|
13 | */
|
14 | dropdownTarget: JSX.Element;
|
15 | /**
|
16 | * Props to pass to the dropdown.
|
17 | */
|
18 | dropdownProps?: IPopoverProps;
|
19 | /**
|
20 | * Callback invoked to render each visible item. The item will be wrapped in an `li` with
|
21 | * the optional `visibleItemClassName` prop.
|
22 | */
|
23 | visibleItemRenderer: (props: MenuItemProps, index: number) => JSX.Element;
|
24 | /**
|
25 | * Which direction the items should collapse from: start or end of the children.
|
26 | *
|
27 | * @default Boundary.START
|
28 | */
|
29 | collapseFrom?: Boundary;
|
30 | /**
|
31 | * CSS class names to add to `<li>` tags containing each visible item and the dropdown.
|
32 | */
|
33 | visibleItemClassName?: string;
|
34 | /**
|
35 | * Exact number of visible items.
|
36 | *
|
37 | * @default 3
|
38 | */
|
39 | visibleItemCount?: number;
|
40 | }
|
41 | /** @deprecated use `<OverflowList>` for automatic overflow based on available space. */
|
42 | export declare class CollapsibleList extends React.Component<CollapsibleListProps> {
|
43 | static displayName: string;
|
44 | static defaultProps: Partial<CollapsibleListProps>;
|
45 | render(): JSX.Element;
|
46 | private partitionChildren;
|
47 | }
|