Skip to content

Commit d3ec552

Browse files
committed
add tags from extractStories to index inputs
1 parent c1e0193 commit d3ec552

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/parser/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface StoryDef {
77
source: string;
88
description?: string;
99
hasArgs: boolean;
10+
tags: string[];
1011
}
1112

1213
/**

src/preset/indexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function createIndex(
6262
exportName: id,
6363
name: story.name,
6464
title: makeTitle(defs.meta.title),
65-
tags: defs.meta.tags,
65+
tags: [...(defs.meta.tags ?? []), ...story.tags],
6666
metaTags: defs.meta.tags,
6767
}));
6868
}

0 commit comments

Comments
 (0)