1 | /// <reference types="react" />
|
2 | import { Panel } from "./panelTypes";
|
3 | export interface PanelView2Props<T extends Panel<object>> {
|
4 | /**
|
5 | * Callback invoked when the user presses the back button or a panel invokes
|
6 | * the `closePanel()` injected prop method.
|
7 | */
|
8 | onClose: (removedPanel: T) => void;
|
9 | /**
|
10 | * Callback invoked when a panel invokes the `openPanel(panel)` injected
|
11 | * prop method.
|
12 | */
|
13 | onOpen: (addedPanel: T) => void;
|
14 | /** The panel to be displayed. */
|
15 | panel: T;
|
16 | /** The previous panel in the stack, for rendering the "back" button. */
|
17 | previousPanel?: T;
|
18 | /** Whether to show the header with the "back" button. */
|
19 | showHeader: boolean;
|
20 | }
|
21 | interface PanelView2Component {
|
22 | <T extends Panel<object>>(props: PanelView2Props<T>): JSX.Element | null;
|
23 | displayName: string;
|
24 | }
|
25 | export declare const PanelView2: PanelView2Component;
|
26 | export {};
|