You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* add plugin to babel, however disable it by default */
plugins: [
['babel-plugin-storybook-csf-title', false],
],
/* enable the plugin for all files that match your story name pattern */
overrides: [{
include: /\/stories\.(ts|tsx)$/,
plugins: [
['babel-plugin-storybook-csf-title', { toTitle: require('./your-to-title-function') }]
]
}]
should be changed from including a title attribute on every file that matches with /stories.ts or /stories.tsx to including a title attribute on every file that matches with .stories.ts or .stories.ts as it is best practice to name your story something like my-snowflake-component.stories.ts and not have a sub folder with a stories.ts file in it.
/* add plugin to babel, however disable it by default */
plugins: [
['babel-plugin-storybook-csf-title', false],
],
/* enable the plugin for all files that match your story name pattern */
overrides: [{
include: /\.stories\.(ts|tsx)$/,
plugins: [
['babel-plugin-storybook-csf-title', { toTitle: require('./your-to-title-function') }]
]
}]
This would have saved me a lot of debugging.
The text was updated successfully, but these errors were encountered:
The installation instructions in the
README.md
could be improved by including story files that conform with naming best practices at https://storybook.js.org/docs/react/writing-stories/introduction#where-to-put-stories.At https://github.com/atlassian-labs/babel-plugin-storybook-csf-title#installation
should be changed from including a title attribute on every file that matches with
/stories.ts
or/stories.tsx
to including a title attribute on every file that matches with.stories.ts
or.stories.ts
as it is best practice to name your story something likemy-snowflake-component.stories.ts
and not have a sub folder with astories.ts
file in it.This would have saved me a lot of debugging.
The text was updated successfully, but these errors were encountered: