storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.5k stars 9.29k forks source link

[Documentation]: svelte csf snippets migth have typo #29415

Open domuk-k opened 6 days ago

domuk-k commented 6 days ago

Describe the problem

In the code snippet found in storybook/docs/_snippets/page-story-slots.md, there is a <template let:args>declaration. If intended as such, it seems that <Template let:arg> is more contextually appropriate.

Here is the relevant code snippet:

storybook/docs/_snippets/page-story-slots.md

{/* Page.stories.svelte */}

<script>
  import { Meta, Template, Story } from '@storybook/addon-svelte-csf';

  import Page from './Page.svelte';
</script>

<meta title="Page" component="{Page}" /> // not meta => Meta from @storybook/addon-svelte-csf

<template let:args> // not template => Template from @storybook/addon-svelte-csf
  <Page {...args}>
    <footer>{args.footer}</footer>
  </Page>
</template>

<Story name="CustomFooter" args={{ footer: 'Built with Storybook', }} />

and same for these snippets i guess

Additional context

No response

jonniebigodes commented 6 days ago

@domuk-k, thanks for taking the time to reach out to us by opening this issue. So that you're aware, the snippets you mentioned are a bit outdated as they referenced a previous version of the Svelte addon and don't reflect the current state of the integration. We're looking into it and hope to update the snippets shortly.

Have a fantastic day.

Stay safe