UNPKG

@blueprintjs/core

Version:
51 lines (50 loc) 1.87 kB
import * as React from "react"; import { AbstractPureComponent2 } from "../../common"; import { IButtonProps } from "../button/buttons"; import { IDialogProps } from "./dialog"; import { DialogStepId } from "./dialogStep"; export interface IMultistepDialogProps extends IDialogProps { /** * Props for the back button. */ backButtonProps?: Partial<Pick<IButtonProps, "disabled" | "text">>; /** * Props for the button to display on the final step. */ finalButtonProps?: Partial<IButtonProps>; /** * Props for the next button. */ nextButtonProps?: Partial<Pick<IButtonProps, "disabled" | "text">>; /** * A callback that is invoked when the user selects a different step by clicking on back, next, or a step itself. */ onChange?(newDialogStepId: DialogStepId, prevDialogStepId: DialogStepId | undefined, event: React.MouseEvent<HTMLElement>): void; /** * Whether to reset the dialog state to its initial state on close. * By default, closing the dialog will reset its state. */ resetOnClose?: boolean; } interface IMultistepDialogState { lastViewedIndex: number; selectedIndex: number; } export declare class MultistepDialog extends AbstractPureComponent2<IMultistepDialogProps, IMultistepDialogState> { static displayName: string; static defaultProps: Partial<IMultistepDialogProps>; state: IMultistepDialogState; render(): JSX.Element; componentDidUpdate(prevProps: IMultistepDialogProps): void; private getDialogStyle; private renderLeftPanel; private renderDialogStep; private handleClickDialogStep; private maybeRenderRightPanel; private renderFooter; private renderButtons; private getDialogStepChangeHandler; /** Filters children to only `<DialogStep>`s */ private getDialogStepChildren; } export {};