UNPKG

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