Instead of a list of folders in StoryBook, I just want to have the title say "Prismic Slices", as this is something that might be shared with the client.
Is there a way to configure this? And if I change them manually, will they eventually be overwritten?
To make available all the Slice in the PrismicSlice folder you have to do these things:
First register libraries in the sm.json file. There is one library available by default @/slices but you can register more as you want. For example, I have added one more library @/PrismicSlices
Now you can move all your existing Slices from src/modules/prismic/slices' to PrismicSlices folder manually. And you need to update imports in index.stories.js file.
If you are creating any new slices, select this PrismicSlices target library in the Slice builder.
I don't think I explained it properly. I would like to keep the slices where I have them (src/modules/prismic/slices) and have already modified sm.json to put them there.
I'm only referring to the way Storybook names the category of components, which happens here:
title in the index.stories.js file is autogenerated based upon the library of the Slices. You can try to modify it manually to change the preview in the Storybook. Give this a try: