8000 Allow sorting stories in export order · Issue #601 · tajo/ladle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Allow sorting stories in export order #601
Open
@rwaltenberg

Description

@rwaltenberg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0