Ian VanSchooten dfb9384de6 Create separate jest projects in /lib
This allows us to run some projects with node, and others with browser environment
2022-11-10 13:46:42 -05:00
..
2022-10-29 19:49:45 +08:00

CSF Plugin

The CSF plugin reads CSF files and enriches their content via static analysis. It supports Webpack, Vite, and other bundlers using unplugin.

Source snippets

CSF plugin can add static source snippets to each story. For example:

export const Basic = () => <Button />;

Would be transformed to:

export const Basic = () => <Button />;
Basic.parameters = {
  storySource: {
    source: '() => <Button />',
  },
  ...Basic.parameters,
};

This allows @storybook/addon-docs to display the static source snippet.