storybook-addon-react-docgen
Version:
A storybook addon to display react docgen info.
34 lines (33 loc) • 1.5 kB
TypeScript
import React from 'react';
import { PropTableProps } from './PropTable';
import { ComponentFilterType, Component } from '../types';
interface GetPropsOptions {
propTables?: React.ComponentType[] | null;
order?: string[];
include?: ComponentFilterType[];
exclude?: ComponentFilterType[];
children: React.ReactElement;
}
export declare const getProps: ({ propTables, include, exclude, order, children }: GetPropsOptions) => Component[];
export declare const stylesheetBase: Record<'infoBody' | 'h1' | 'propTableHead' | 'description' | 'infoPage', React.CSSProperties>;
export declare type PropTableStyleSheet = typeof stylesheetBase;
export declare type PropTableType = React.ComponentType<Omit<PropTableProps, 'propDefinitions'>>;
export declare type StylingFunction = (styles: PropTableStyleSheet) => PropTableStyleSheet;
declare type StoryProps = {
PropTable: PropTableType;
propTables?: React.ComponentType[] | null;
styles: StylingFunction;
components?: Component[];
maxPropObjectKeys: number;
maxPropArrayLength: number;
maxPropStringLength: number;
excludedPropTypes?: string[];
};
declare const Story: {
({ styles, ...props }: StoryProps): JSX.Element;
defaultProps: {
PropTable: (props: Pick<PropTableProps, "maxPropArrayLength" | "maxPropObjectKeys" | "maxPropStringLength" | "maxPropsIntoLine" | "excludedPropTypes" | "type">) => JSX.Element | null;
excludedPropTypes: never[];
};
};
export default Story;