Valentin Palkovic 9f1ec03236 Revert "Deprecate @storybook/csf-plugin and remove references"
This reverts commit 19fb74d6cb9e016e6067352f83b590281f0f5efe.
2024-05-23 09:16:24 +02:00

584 B

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.