Skip to content

Commit

Permalink
fix: Comments cannot be inside snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
xeho91 committed May 25, 2024
1 parent 3dd8d62 commit c05ca61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stories/RequiredSnippet.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<Story name="Case 2" args={{ children }} />

<!-- Works, as expected, but TypeScript is not happy -->
<Story name="Case 3">
<!-- Current workaround: add `args: { children: "" }` to `defineMeta`, but this is invalid, Svelte snippets cannot be literal, they're functions -->
<Story name="Case 3">
{#snippet children()}
<p>This works</p>
{/snippet}
Expand Down

0 comments on commit c05ca61

Please sign in to comment.