Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
domuk-k opened this issue Oct 21, 2024 · 1 comment
Open

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

domuk-k opened this issue Oct 21, 2024 · 1 comment

Comments

@domuk-k
Copy link

domuk-k commented Oct 21, 2024

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

  • docs/_snippets/page-story-slots.md
  • docs/_snippets/button-story-default.md
  • docs/_snippets/list-story-starter.md
  • docs/_snippets/button-story-click-handler-simplificated.md
  • docs/_snippets/button-story-with-addon-example.md
  • docs/_snippets/table-story-fully-customize-controls.md
  • docs/_snippets/my-component-with-env-variables.md
  • docs/_snippets/button-story-using-args.md
  • docs/_snippets/your-component.md
  • docs/_snippets/button-story-component-decorator.md
  • docs/_snippets/your-component-with-decorator.md
  • docs/_snippets/component-story-custom-args-complex.md
  • docs/_snippets/button-story-with-args.md

Additional context

No response

@jonniebigodes
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants