@storybook/addon-storysource

  • Version 8.6.4
  • Published
  • 1.89 MB
  • 3 dependencies
  • MIT license

Install

npm i @storybook/addon-storysource
yarn add @storybook/addon-storysource
pnpm add @storybook/addon-storysource

Overview

View a story’s source code to see how it works and paste into your app

Index

Variables

variable ADDON_ID

const ADDON_ID: string;

    variable PANEL_ID

    const PANEL_ID: string;

      Interfaces

      interface StorySourceParameters

      interface StorySourceParameters {}

        property storySource

        storySource?: {
        /** Dark mode for source code */
        dark?: boolean;
        /** Remove the addon panel and disable the addon's behavior */
        disable?: boolean;
        /** Source code formatting options */
        format?: 'jsx' | 'typescript' | 'javascript';
        /** Source code language */
        language?: string;
        /** Source code loader options */
        loaderOptions?: {
        /** Ignore specific patterns */
        ignore?: string[];
        /** Include specific patterns */
        include?: string[];
        /** Parser options */
        parser?: string;
        /** Pretty print source code */
        prettierConfig?: object;
        };
        /** Show story source code */
        showCode?: boolean;
        /** Source code transformations */
        transformSource?: (source: string, storyContext: any) => string;
        };
        • Storysource addon configuration

          See Also

          • https://github.com/storybookjs/storybook/tree/next/code/addons/storysource

        Package Files (1)

        Dependencies (3)

        Dev Dependencies (6)

        Peer Dependencies (1)

        Badge

        To add a badge like this onejsDocs.io badgeto 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-storysource.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-storysource)
        • HTML
          <a href="https://www.jsdocs.io/package/@storybook/addon-storysource"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>