Skip to content

Commit

Permalink
chore: fixed documentation sidebar grouping (#4786)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-cheishvili authored Aug 21, 2023
1 parent 19e5ea8 commit f222249
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ const config: StorybookConfig = {
core: {
disableTelemetry: true,
},
storyIndexers: (indexers) => {
const indexer = async (fileName, opts) => {
experimental_indexers: (indexers) => {
const index = async (fileName, opts) => {
const owner = getOwner({ importPath: './' + relative(process.cwd(), fileName).replace(/\\/g, '/') });
const code = readFileSync(fileName, { encoding: 'utf-8' });
return loadCsf(code, {
...opts, fileName, makeTitle: (userTitle) => {
return owner ? `${owner.title} / ${userTitle}` : userTitle;
}
}).parse();
}).parse().indexInputs;
};

return [
{
test: /(visual|stories)\.(js|ts)$/,
indexer
index
} as any,
...(indexers || [])
];
Expand Down

0 comments on commit f222249

Please sign in to comment.