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.
At the moment
autoonly 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:
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
useParameterhook.Another option I've considered is to have a
formatoption, 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.