JSPM

  • Created
  • Published
  • Downloads 18191
  • Score
    100M100P100Q131416F
  • License MIT

Provides a link to the story's source in the toolbar

Package Exports

  • storybook-source-link
  • storybook-source-link/dist/cjs/index.js
  • storybook-source-link/dist/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (storybook-source-link) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Storybook Addon Source Link

Provides a link to the story's source in the toolbar. Initialized with this template. There you'll find specifics on development and release inside the README.md

Usage

Inside each story, include a parameters for your stories source code.

export default {
  title: 'Example',
  component: Button,
  parameters: {
    sourceLink: '<link to source>'
  }
};

If the parameter is set, the icon which links to the source code in a new tab will be active

Screen Shot 2022-03-23 at 1 15 50 PM

If an inactive source link is clicked, a tool-top will remind the user of this usage.