Skip to content

Latest commit

 

History

History

storybook-addon

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@lg-tools/storybook-addon

Storybook addon to share configuration in LeafyGreen repositories.

Usage

Install this package, and consume it in your .storybook/ config files.

// .storybook/main.ts
export default {
  addons: ['@lg-tools/storybook-addon'],
  framework: {
    name: '@storybook/react-webpack5',
    options: {
      fastRefresh: true,
      strictMode: true,
    },
  },
};

Most parameters preview.ts will be automatically populated by the addon. However you may want to customize certain things like section ordering:

// .storybook/preview.js
const parameters = {
  options: {
    storySort: {
      method: 'alphabetical',
      order: [
        // ... section headers
      ],
    },
  },
};

export default {
  parameters,
};