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

Allow sorting stories in export order #601

Open
rwaltenberg opened this issue Feb 21, 2025 · 0 comments
Open

Allow sorting stories in export order #601

rwaltenberg opened this issue Feb 21, 2025 · 0 comments
Labels
needs triage needs to be reviewed

Comments

@rwaltenberg
Copy link

Is your feature request related to a problem? Please describe.
I'm coming from Storybook, where a common pattern is to have a "Default" or "Playground" story for each component, followed by other stories with customizations. The "Default" story is always shown first when clicking on the component name because stories are sorted in the order they are exported in the *.stories.ts file.

Describe the solution you'd like
Currently, the storyOrder config allows specifying an array of stories or a function that returns an array. My suggestion is to support two additional string values:

  • alphabetical – This is the current default behavior.
  • export – This would allow sorting stories in the same order they are exported in the file.
@rwaltenberg rwaltenberg added the needs triage needs to be reviewed label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

1 participant