UNPKG

704 BTypeScriptView Raw
1import { ElementType, FunctionComponent } from 'react';
2import type { Parameters } from '@storybook/api';
3export declare enum StoryError {
4 NO_STORY = "No component or story to display"
5}
6interface CommonProps {
7 title: string;
8 height?: string;
9 id: string;
10}
11interface InlineStoryProps extends CommonProps {
12 parameters: Parameters;
13 storyFn: ElementType;
14}
15declare type IFrameStoryProps = CommonProps;
16declare type StoryProps = InlineStoryProps | IFrameStoryProps;
17/**
18 * A story element, either rendered inline or in an iframe,
19 * with configurable height.
20 */
21declare const Story: FunctionComponent<StoryProps & {
22 inline: boolean;
23 error?: StoryError;
24}>;
25export { Story };