storybook-addon-react-docgen
Version:
A storybook addon to display react docgen info.
43 lines (42 loc) • 1.53 kB
TypeScript
import React from 'react';
import { PropTableType, StylingFunction } from './Components/Story';
import { DisplayOptions, ComponentFilterType } from './types';
declare type DocgenTableOptions = DisplayOptions & {
/**
* Components used in story
* Displays Prop Tables with these components
* @default []
*/
propTables: React.ComponentType[] | null;
/**
* Define custom sorting order for the components specifying component names in the desired order.
* Example:
* propTablesSortOrder: ["MyComponent", "FooComponent", "AnotherComponent"]
* @default []
*/
propTablesSortOrder?: string[];
/**
* Only include prop tables for these components.
* Accepts an array of component classes or functions
* @default null
*/
propTablesInclude?: ComponentFilterType[];
/**
* Exclude Components from being shown in Prop Tables section
* Accepts an array of component classes or functions
* @default []
*/
propTablesExclude?: ComponentFilterType[];
/**
* Overrides styles of addon. The object should follow this shape:
* This prop can also accept a function which has the default stylesheet passed as an argument
*/
styles: StylingFunction;
/**
* Override the component used to render the props table
* @default PropTable
*/
TableComponent: PropTableType;
};
export declare const withPropsTable: (options: DocgenTableOptions) => any;
export { default as Story } from './Components/Story';