Skip to content

Commit

Permalink
add tags stories
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed Aug 30, 2024
1 parent d3ec552 commit 65cdbeb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions stories/tags.stories.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script context="module">
import { Story, Template } from '../src/index';
/**
* Testing tags parsing in the addon's indexer.
* - In the sidebar, only the _"With Dev"_ story should be visible.
* - In docs, only the _"With Autodocs"_ story should be visible.
*/
export const meta ={
title: 'Tags',
parameters: {
controls: { disable: true },
},
tags: ['meta-first', '!meta-second', '!meta-third'],
};
</script>

<Template let:context>
<h1>Tags:</h1>
<pre><code>{JSON.stringify(context.tags, null, 2)}</code></pre>
</Template>

<Story name="No Story Tags" />

<Story name="With story tag" tags={['story-first']} />

<Story name="With story tag, meta disabled" tags={['story-first', '!meta-first']} />

<Story name="With story tag, meta enabled" tags={['story-first', 'meta-second']} />

0 comments on commit 65cdbeb

Please sign in to comment.