react-native-storybook-loader
react-native-storybook-loader copied to clipboard
Sort stories alphabetically (question)
I tried to sort the stories alphabetically so I added this code block but it didnt't seem to work.
addParameters({
options: {
storySort: {
method: 'alphabetical',
},
},
});
Then I realized storybook-loader probably has its own sort method and I found #11 but I can't figure out how to set that. Right now it seems like my stories are being alphabetically using the file path instead of the story name:
Is there a way for me to either: Display the enclosing folders in the storybook hierarchy like this:
- Atom
- Banner
- ButtonGradient
- ...
- Molecules
- AnimatedHeader
- ...
OR
Have them all display in alphabetical order of the story names in the root like this:
- AnimatedHeader
- Banner
- ButtonGradient
- ...
I'm wondering this too..
Just thought I'd add a bit more to this issue. I attempted using grouping in my stories as explained in the Storybook docs but that didn't seem to work. This is what i added to the end of my stories.js
:
export default {
title: 'Atoms/Banner',
};
I also tried changing the the kind
of storiesOf
from Banner
to Atoms/Banner
which didn't work either. The attempt:
storiesOf('Atoms/Banner', module).add('default', () => <Banner />);