import { PureComponent } from "react"; import type { Props } from "@blueprintjs/core"; export interface ExampleProps extends Props { /** * Identifier of this example. * This will appear as the `data-example-id` attribute on the DOM element. */ id: string; /** * Container for arbitary data passed to each example from the parent * application. This prop is ignored by the `` component; it is * available for your example implementations to access by providing a `` * type to this interface. Pass actual `data` when defining your example map * for the `ReactExampleTagRenderer`. * * A container like this is necessary because unknown props on the * `` component are passed to its underlying DOM element, so adding * your own props will result in React "unknown prop" warnings. */ data?: T; } /** @deprecated use DocsExampleProps */ export type IDocsExampleProps = DocsExampleProps; /** * Props supported by the `Example` component. * Additional props will be spread to the root `
` element. */ export interface DocsExampleProps extends ExampleProps { children?: React.ReactNode; /** * Options for the example, which will typically appear in a narrow column * to the right of the example. */ options: React.ReactNode; /** * Whether options should appear in a full-width row below the example * container. By default, options appear in a single column to the right of * the example. If this prop is enabled, then the options container becomes * a flex row; group options into columns by wrapping them in a `
`. * * @default false */ showOptionsBelowExample?: boolean; /** * HTML markup for the example, which will be directly injected into the * example container using `dangerouslySetInnerHTML`. * * This prop is mutually exclusive with and takes priority over `children`. */ html?: string; /** * Whether `forceUpdate()` should be invoked after the first render to * ensure correct DOM sizing. * * @default true */ forceUpdate?: boolean; } /** * Container for an example and its options. * * ```tsx * import { PureComponent } from "react"; * * import { Example, ExampleProps } from "@blueprintjs/docs-theme"; * * // use ExampleProps as your props type, * // then spread it to below * export class MyExample extends PureComponent { * public render() { * const options = ( * <> * --- render options here --- * * ); * return ( * * --- render examples here --- * * ); * } * ``` */ export declare class Example extends PureComponent { static defaultProps: Partial; private hasDelayedInitialRender; render(): import("react/jsx-runtime").JSX.Element | null; componentDidMount(): void; }