@storybook/addon-docs
- Version 6.5.16
- Published
- 352 kB
- 28 dependencies
- MIT license
Install
npm i @storybook/addon-docs
yarn add @storybook/addon-docs
pnpm add @storybook/addon-docs
Overview
Document component usage and properties in Markdown
Index
Variables
Functions
Interfaces
Enums
Type Aliases
Variables
variable AddContext
const AddContext: FC<DocsContextProps>;
variable Anchor
const Anchor: FC<AnchorProps>;
variable AnchorMdx
const AnchorMdx: FC<AnchorMdxProps>;
variable ArgsTable
const ArgsTable: FC<ArgsTableProps>;
variable Canvas
const Canvas: FC<any>;
variable CodeOrSourceMdx
const CodeOrSourceMdx: FC<CodeOrSourceMdxProps>;
variable ComponentsTable
const ComponentsTable: FC<ComponentsProps>;
variable CURRENT_SELECTION
const CURRENT_SELECTION: string;
variable Description
const Description: FunctionComponent<DescriptionProps>;
variable DocsContainer
const DocsContainer: FunctionComponent<DocsContainerProps<AnyFramework>>;
variable DocsContext
const DocsContext: Context<DocsContextProps<AnyFramework>>;
variable DocsPage
const DocsPage: FC;
variable DocsStory
const DocsStory: FunctionComponent<DocsStoryProps>;
variable HeaderMdx
const HeaderMdx: FC<HeaderMdxProps>;
variable HeadersMdx
const HeadersMdx: {};
variable Heading
const Heading: FunctionComponent<HeadingProps>;
variable Meta
const Meta: FC<BaseAnnotations>;
This component is used to declare component metadata in docs and gets transformed into a default export underneath the hood.
variable Primary
const Primary: FC<PrimaryProps>;
variable PRIMARY_STORY
const PRIMARY_STORY: string;
variable Source
const Source: FC<ComponentProps<any>>;
Story source doc block renders source code if provided, or the source for a story if
storyId
is provided, or the source for the current story if nothing is provided.
variable SourceContainer
const SourceContainer: FC<{}>;
variable SourceContext
const SourceContext: Context<SourceContextProps>;
variable Stories
const Stories: FunctionComponent<StoriesProps>;
variable Story
const Story: FunctionComponent<any>;
variable StoryTable
const StoryTable: FC< BaseProps & { story: string; showComponent?: boolean } & { component: Component; subcomponents: Record<string, Component>; }>;
variable Subheading
const Subheading: FunctionComponent<HeadingProps>;
variable Subtitle
const Subtitle: FunctionComponent<SubtitleProps>;
variable Title
const Title: FunctionComponent<TitleProps>;
variable Wrapper
const Wrapper: FunctionComponent;
Functions
function anchorBlockIdFromId
anchorBlockIdFromId: (storyId: string) => string;
function assertIsFn
assertIsFn: (val: any) => any;
function extractComponentArgTypes
extractComponentArgTypes: ( component: Component, { id, storyById }: DocsContextProps, include?: PropDescriptor, exclude?: PropDescriptor) => StrictArgTypes;
function extractTitle
extractTitle: ({ title }: DocsContextProps) => string;
function getComponent
getComponent: ( props: ArgsTableProps, { id, storyById }: DocsContextProps) => Component;
function getDescriptionProps
getDescriptionProps: ( { of, type, markdown, children }: DescriptionProps, { id, storyById }: DocsContextProps<any>) => PureDescriptionProps;
function getSourceProps
getSourceProps: ( props: SourceProps, docsContext: DocsContextProps<any>, sourceContext: SourceContextProps) => PureSourceProps & SourceStateProps;
function getStoryId
getStoryId: (props: StoryProps, context: DocsContextProps) => StoryId;
function getStoryProps
getStoryProps: <TFramework extends AnyFramework>( { height, inline }: StoryProps, story: StoryType<TFramework>, context: DocsContextProps<TFramework>, onStoryFnCalled: () => void) => ComponentProps<any>;
function lookupStoryId
lookupStoryId: ( storyName: string, { mdxStoryNameToKey, mdxComponentAnnotations }: DocsContextProps) => string;
function Preview
Preview: (props: ComponentProps<FC<any>>) => JSX.Element;
function Props
Props: (props: ComponentProps<FC<ArgsTableProps>>) => JSX.Element;
function storyBlockIdFromId
storyBlockIdFromId: (storyId: string) => string;
Interfaces
interface AnchorProps
interface AnchorProps {}
property storyId
storyId: string;
interface DocsContainerProps
interface DocsContainerProps<TFramework extends AnyFramework = AnyFramework> {}
property context
context: DocsContextProps<TFramework>;
interface HeadingProps
interface HeadingProps {}
property children
children: JSX.Element | string;
property disableAnchor
disableAnchor?: boolean;
interface SourceContextProps
interface SourceContextProps {}
interface SourceItem
interface SourceItem {}
interface StoryData
interface StoryData {}
property id
id?: string;
property kind
kind?: string;
property name
name?: string;
property parameters
parameters?: any;
Enums
enum DescriptionType
enum DescriptionType { INFO = 'info', NOTES = 'notes', DOCGEN = 'docgen', LEGACY_5_2 = 'legacy-5.2', AUTO = 'auto',}
member AUTO
AUTO = 'auto'
member DOCGEN
DOCGEN = 'docgen'
member INFO
INFO = 'info'
member LEGACY_5_2
LEGACY_5_2 = 'legacy-5.2'
member NOTES
NOTES = 'notes'
enum SourceState
enum SourceState { OPEN = 'open', CLOSED = 'closed', NONE = 'none',}
Type Aliases
type Component
type Component = any;
type DocsStoryProps
type DocsStoryProps = StoryData & { expanded?: boolean; withToolbar?: boolean;};
type StoryProps
type StoryProps = (StoryDefProps | StoryRefProps | StoryImportProps) & CommonProps;
type StorySources
type StorySources = Record<StoryId, SourceItem>;
Package Files (24)
- dist/ts3.9/blocks/Anchor.d.ts
- dist/ts3.9/blocks/ArgsTable.d.ts
- dist/ts3.9/blocks/Canvas.d.ts
- dist/ts3.9/blocks/Description.d.ts
- dist/ts3.9/blocks/DocsContainer.d.ts
- dist/ts3.9/blocks/DocsContext.d.ts
- dist/ts3.9/blocks/DocsPage.d.ts
- dist/ts3.9/blocks/DocsStory.d.ts
- dist/ts3.9/blocks/Heading.d.ts
- dist/ts3.9/blocks/Meta.d.ts
- dist/ts3.9/blocks/Preview.d.ts
- dist/ts3.9/blocks/Primary.d.ts
- dist/ts3.9/blocks/Props.d.ts
- dist/ts3.9/blocks/Source.d.ts
- dist/ts3.9/blocks/SourceContainer.d.ts
- dist/ts3.9/blocks/Stories.d.ts
- dist/ts3.9/blocks/Story.d.ts
- dist/ts3.9/blocks/Subheading.d.ts
- dist/ts3.9/blocks/Subtitle.d.ts
- dist/ts3.9/blocks/Title.d.ts
- dist/ts3.9/blocks/Wrapper.d.ts
- dist/ts3.9/blocks/mdx.d.ts
- dist/ts3.9/blocks/types.d.ts
- dist/ts3.9/index.d.ts
Dependencies (28)
- @babel/plugin-transform-react-jsx
- @babel/preset-env
- @jest/transform
- @mdx-js/react
- @storybook/addons
- @storybook/api
- @storybook/components
- @storybook/core-common
- @storybook/core-events
- @storybook/csf
- @storybook/docs-tools
- @storybook/mdx1-csf
- @storybook/node-logger
- @storybook/postinstall
- @storybook/preview-web
- @storybook/source-loader
- @storybook/store
- @storybook/theming
- babel-loader
- core-js
- fast-deep-equal
- global
- lodash
- regenerator-runtime
- remark-external-links
- remark-slug
- ts-dedent
- util-deprecate
Dev Dependencies (3)
Peer Dependencies (3)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-docs
.
- Markdown[](https://www.jsdocs.io/package/@storybook/addon-docs)
- HTML<a href="https://www.jsdocs.io/package/@storybook/addon-docs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4361 ms. - Missing or incorrect documentation? Open an issue for this package.