ADDON_ID (docs-tools/shared.ts)

storybook · code/core/src/docs-tools/shared.ts · typescript · MIT
ui, tag:embed-classified

Exports Storybook docs constants and enum for addon configuration.

// Source: https://github.com/storybookjs/storybook | License: MIT | Copyright 2024 Storybook
// Provided via justclaw.it.com; keep this notice with the code.
export const ADDON_ID = 'storybook/docs';
export const PANEL_ID = `${ADDON_ID}/panel`;
export const PARAM_KEY = `docs`;

/** DOM id of the wrapper element the `Anchor` doc block renders around each story in a docs page. */
export const anchorBlockIdFromId = (storyId: string) => `anchor--${storyId}`;

export const SNIPPET_RENDERED = `${ADDON_ID}/snippet-rendered`;

export enum SourceType {
  /**
   * AUTO is the default
   *
   * Use the CODE logic if:
   *
   * - The user has set a custom source snippet in `docs.source.code` story parameter
   * - The story is not an args-based story
   *
   * Use the DYNAMIC rendered snippet if the 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key