Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention TSX index file requirement in README #6887

Merged
merged 2 commits into from
Jun 3, 2019

Conversation

jefflovejapan
Copy link

I was stuck getting Storybook working with TypeScript following the steps here. My components weren't showing up in the Storybook index.
Issue:

Following the instructions for integrating Storybook with TypeScript in a project started with the create-react-app script, the components I added in my stories/index were not showing up on the storybook index page.

What I did

Diffed my project with the demo repo, realized that my index file had a different name. Not sure where this requirement comes from, but stories won't show up in the index if it has the name stories/index.tsx, which is the likeliest name the user is going to give this file since the default is stories/index.js.

How to test

  • Is this testable with Jest or Chromatic screenshots?
    No

  • Does this need a new example in the kitchen sink apps?
    No

  • Does this need an update to the documentation?
    No, it is an update to the documentation

I was stuck getting Storybook working with TypeScript following the steps here. My components weren't showing up in the Storybook index. Diffing my project with the [demo repo](https://github.com/johot/storybook4-cra2-typescript-react-docgen-typescript-demo) I realized that my index file had the wrong name. Not sure where this requirement comes from, but it doesn't seem to work with `stories/index.tsx`, which is the likeliest name the user is going to give this file if the default is `stories/index.js`.
@jefflovejapan
Copy link
Author

I made this change using the web UI, and submitting against the next branch pulled in a ton of other commits. I'm happy to resubmit by cherry-picking onto next, but saw that documentation changes get moved onto master anyway.

@shilman shilman added documentation patch:yes Bugfix & documentation PR that need to be picked to main branch labels May 27, 2019
@ndelangen ndelangen added this to the 5.1.0 milestone Jun 3, 2019
@ndelangen ndelangen merged commit 065b716 into storybookjs:master Jun 3, 2019
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 5, 2019
shilman pushed a commit that referenced this pull request Jun 5, 2019
Mention TSX index file requirement in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants