0.1.4 • Published 8 days ago

@storybook/csf v0.1.4

Weekly downloads
1,939,926
License
MIT
Repository
github
Last release
8 days ago

Storybook Component Story Format (CSF)

A minimal set of utility functions for dealing with Storybook Component Story Format (CSF).

Install

yarn add @storybook/csf

API

See package source for function definitions and types:

  • storyNameFromExport(key) - Enhance export name (key) of the story. Currently implemented with startCase.

  • isExportStory(key, { includeStories, excludeStories }) - Does a named export match CSF inclusion/exclusion options?

  • parseKind(kind, { rootSeparator, groupSeparator }) - Parse out the component/kind name from a path, using the given separator config.

  • sanitize(string) - Remove punctuation and illegal characters from a story ID.

  • toId(kind, name) - Generate a storybook ID from a component/kind and story name.

Contributing

If you have any suggestions, please open an issue or a PR.

All contributions are welcome!

run tests:

yarn test
@storybook/components@storybook/addon-links@storybook/source-loader@storybook/codemod@storybook/addon-storyshots-puppeteer@storybook/test-runner@everything-registry/sub-chunk-875eslint-plugin-storybook@junk-temporary-prototypes/preview-api@junk-temporary-prototypes/source-loader@junk-temporary-prototypes/core-server@junk-temporary-prototypes/csf-tools@junk-temporary-prototypes/manager-api@junk-temporary-prototypes/blocks@junk-temporary-prototypes/codemod@junk-temporary-prototypes/components@junk-temporary-prototypes/addon-links@junk-temporary-prototypes/addon-storyshots-puppeteer@leafygreen-ui/lib@muraldevkit/ds-manifest-builder@nativescript/storybook@pixi/storybook-rendererplaywright-ct-storybook@vibrant-ui/core@vibrant-ui/forms@vibrant-ui/components-web@animaapp/storybook-components@workday/canvas-kit-docs@zalastax/nolb-_stor@storybook-vue/components@storybook-vue/blocks@storybook/csf-tools@storybook/manager-api@storybook/core-server@storybook/playwright-ct@storybook/nextjs-server@storybook/blocks@storybook/preview-api@storybook/react-native@storybook/testing-react@storybook/server@vitro/codemod@types/storybook__addon-info@squaredup/test-runner@alibaba-aero/storybook-addon-docs@zeplin/cli-connect-storybook-plugin@dblechoc/storybook-addon-docs@deptdk/liquidjs-renderertest-runner-with-snap-speed-exptest-runner-with-snap-speed-exp2raf-storybook-addon-docs-testchromatic-cypresschromatic-playwright@chromatic-com/cypress@chromatic-com/playwright@chromaui/archive-storybook@component-controls/corecreeveystorybook-framework-template-enginestorybook-vue-addon@divriots/csf-helpers@divriots/csf-react-renderer@divriots/csf-simple-book
0.1.4

8 days ago

0.1.4-next.0

8 days ago

0.1.3

1 month ago

0.1.3-next.0

1 month ago

0.1.2

5 months ago

0.1.2-next.0

5 months ago

0.1.1-next.0

11 months ago

0.1.1

11 months ago

0.0.2-next.11

1 year ago

0.1.0

1 year ago

0.0.2-next.10

1 year ago

0.0.2-next.9

1 year ago

0.0.2-next.8

1 year ago

0.0.2-next.7

1 year ago

0.0.2-next.6

1 year ago

0.0.2-next.5

1 year ago

0.0.2-next.4

1 year ago

0.0.2-next.3

1 year ago

0.0.2-next.2

1 year ago

0.0.2-next.1

1 year ago

0.0.2-next.0

1 year ago

0.0.2-alpha.0

4 years ago

0.0.1

4 years ago