UNPKG

1.85 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { MaybeElement, Props } from "../../common/props";
4import { IconName } from "../icon/icon";
5export declare enum NonIdealStateIconSize {
6 STANDARD = 48,
7 SMALL = 32,
8 EXTRA_SMALL = 20
9}
10export declare type NonIdealStateProps = INonIdealStateProps;
11/** @deprecated use NonIdealStateProps */
12export interface INonIdealStateProps extends Props {
13 /** An action to resolve the non-ideal state which appears after `description`. */
14 action?: JSX.Element;
15 /**
16 * Advanced usage: React `children` will appear last (after `action`).
17 * Avoid passing raw strings as they will not receive margins and disrupt the layout flow.
18 */
19 children?: React.ReactNode;
20 /**
21 * A longer description of the non-ideal state.
22 * A string or number value will be wrapped in a `<div>` to preserve margins.
23 */
24 description?: React.ReactChild;
25 /** The name of a Blueprint icon or a JSX Element (such as `<Spinner/>`) to render above the title. */
26 icon?: IconName | MaybeElement;
27 /**
28 * How large the icon visual should be.
29 *
30 * @default NonIdealStateIconSize.STANDARD
31 */
32 iconSize?: NonIdealStateIconSize;
33 /**
34 * Component layout, either vertical or horizontal.
35 *
36 * @default "vertical"
37 */
38 layout?: "vertical" | "horizontal";
39 /** The title of the non-ideal state. */
40 title?: React.ReactNode;
41}
42/**
43 * Non-ideal state component.
44 *
45 * @see https://blueprintjs.com/docs/#core/components/non-ideal-state
46 */
47export declare class NonIdealState extends AbstractPureComponent2<NonIdealStateProps> {
48 static displayName: string;
49 static defaultProps: Partial<NonIdealStateProps>;
50 render(): JSX.Element;
51 private maybeRenderVisual;
52 private maybeRenderText;
53}