Skip to content

Add a custom URL transform option #3

@DanWebb

Description

@DanWebb

At the moment auto only supports lower kebab-case file structures and Github URLs are case sensitive.

I think that to offer max flexibility, we'd have a function parameter which receives the story like so:

parameters: {
  transformUrl(story) {
    return story.title;
  }
}

An attempt at this was already made, but unfortunately, it seems like Storybook doesn't support function parameters – it never makes it through to the useParameter hook.

Another option I've considered is to have a format option, that could specify the casing "kebab-case, "camelCase", "PascalCase" etc. It's a bit less flexible but would be an easy way to cover more file structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions