UNPKG

1.27 kBTypeScriptView Raw
1import { FC } from 'react';
2import { SortType } from '@storybook/components';
3import { PropDescriptor } from '@storybook/store';
4import { StrictArgTypes } from '@storybook/csf';
5import { DocsContextProps } from './DocsContext';
6import { Component } from './types';
7interface BaseProps {
8 include?: PropDescriptor;
9 exclude?: PropDescriptor;
10 sort?: SortType;
11}
12declare type OfProps = BaseProps & {
13 of: '.' | '^' | Component;
14};
15declare type ComponentsProps = BaseProps & {
16 components: {
17 [label: string]: Component;
18 };
19};
20declare type StoryProps = BaseProps & {
21 story: '.' | '^' | string;
22 showComponent?: boolean;
23};
24declare type ArgsTableProps = BaseProps | OfProps | ComponentsProps | StoryProps;
25export declare const extractComponentArgTypes: (component: Component, { id, storyById }: DocsContextProps, include?: PropDescriptor, exclude?: PropDescriptor) => StrictArgTypes;
26export declare const getComponent: (props: ArgsTableProps, { id, storyById }: DocsContextProps) => Component;
27export declare const StoryTable: FC<StoryProps & {
28 component: Component;
29 subcomponents: Record<string, Component>;
30}>;
31export declare const ComponentsTable: FC<ComponentsProps>;
32export declare const ArgsTable: FC<ArgsTableProps>;
33export {};