From 5b10679f286e340187c6a7a5e753fe4e11c88e7c Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Fri, 15 Nov 2024 19:01:29 +0000 Subject: [PATCH] Docs: Minor fixes to Svelte CSF --- docs/_snippets/arg-types-in-story.md | 3 +- docs/_snippets/button-group-story.md | 54 ++----------------- .../button-story-component-decorator.md | 8 ++- docs/_snippets/button-story-using-args.md | 6 +-- docs/_snippets/button-story-with-emojis.md | 6 +-- docs/_snippets/button-story.md | 6 +-- .../component-story-custom-args-mapping.md | 6 +-- .../component-story-static-asset-cdn.md | 6 +-- ...omponent-story-static-asset-with-import.md | 6 +-- ...onent-story-static-asset-without-import.md | 6 +-- docs/_snippets/list-story-starter.md | 2 +- .../my-component-play-function-alt-queries.md | 8 +-- ...my-component-play-function-query-findby.md | 14 ++--- .../my-component-play-function-waitfor.md | 6 +-- .../my-component-play-function-with-canvas.md | 6 +-- ...component-play-function-with-clickevent.md | 6 +-- .../my-component-play-function-with-delay.md | 6 +-- ...omponent-play-function-with-selectevent.md | 6 +-- .../my-component-story-basic-and-props.md | 6 +-- .../my-component-vite-env-variables.md | 6 +-- .../my-component-with-env-variables.md | 6 +-- .../nextjs-navigation-override-in-story.md | 3 +- .../nextjs-router-override-in-story.md | 3 +- docs/_snippets/parameters-in-story.md | 4 +- .../register-component-with-play-function.md | 1 - .../tags-autodocs-remove-component.md | 12 ++--- docs/_snippets/tags-combo-example.md | 12 ++--- docs/_snippets/tags-in-meta-and-story.md | 4 +- docs/_snippets/tags-remove-in-story.md | 6 +-- .../your-component-with-decorator.md | 10 ++-- docs/_snippets/your-component.md | 2 +- docs/get-started/frameworks/svelte-vite.mdx | 6 +-- docs/get-started/frameworks/sveltekit.mdx | 6 +-- docs/get-started/install.mdx | 2 +- docs/writing-stories/decorators.mdx | 2 - docs/writing-stories/index.mdx | 2 +- 36 files changed, 98 insertions(+), 156 deletions(-) diff --git a/docs/_snippets/arg-types-in-story.md b/docs/_snippets/arg-types-in-story.md index 41508f9a65d..43ce951c112 100644 --- a/docs/_snippets/arg-types-in-story.md +++ b/docs/_snippets/arg-types-in-story.md @@ -52,7 +52,7 @@ const meta = { export default meta; -type Story = StoryObj; +type Story = StoryObj; export const Basic = { argTypes: { @@ -126,4 +126,3 @@ export const Basic: Story = { }, }; ``` - diff --git a/docs/_snippets/button-group-story.md b/docs/_snippets/button-group-story.md index 14a3021bbab..146034a60d1 100644 --- a/docs/_snippets/button-group-story.md +++ b/docs/_snippets/button-group-story.md @@ -175,28 +175,12 @@ export const Pair: Story = { - - - - ``` ```js filename="ButtonGroup.stories.js" renderer="svelte" language="js" tabTitle="CSF" @@ -232,28 +216,12 @@ export const Pair = { - - - - ``` ```ts filename="ButtonGroup.stories.ts" renderer="svelte" language="ts-4-9" tabTitle="CSF" @@ -294,28 +262,12 @@ export const Pair: Story = { - - - - ``` ```ts filename="ButtonGroup.stories.ts" renderer="svelte" language="ts" tabTitle="CSF" diff --git a/docs/_snippets/button-story-component-decorator.md b/docs/_snippets/button-story-component-decorator.md index 7ff333389d5..85ef46ff097 100644 --- a/docs/_snippets/button-story-component-decorator.md +++ b/docs/_snippets/button-story-component-decorator.md @@ -199,7 +199,7 @@ export default meta; const { Story } = defineMeta({ component: Button, - decorators: [() => MarginDecorators], + decorators: [() => MarginDecorator], }); ``` @@ -223,7 +223,7 @@ export default { const { Story } = defineMeta({ component: Button, - decorators: [() => MarginDecorators], + decorators: [() => MarginDecorator], }); ``` @@ -251,9 +251,7 @@ export default meta; const { Story } = defineMeta({ component: Button, - decorators: [() => ({ - Component: MarginDecorator, - })], + decorators: [() => MarginDecorator], }); ``` diff --git a/docs/_snippets/button-story-using-args.md b/docs/_snippets/button-story-using-args.md index 5973b4acd0f..97f33121e09 100644 --- a/docs/_snippets/button-story-using-args.md +++ b/docs/_snippets/button-story-using-args.md @@ -336,7 +336,7 @@ export const Tertiary: Story = { args={{ backgroundColor: '#ff0', label: 'πŸ˜„πŸ‘πŸ˜πŸ’―', - }} + }} /> - import { defineMeta } from '@storybook/addon-svelte-csf'; + import { defineMeta } from '@storybook/addon-svelte-csf'; import Button from './Button.svelte'; @@ -344,7 +344,7 @@ export const Tertiary = { ```svelte filename="Button.stories.svelte" renderer="svelte" language="ts-4-9" tabTitle="Svelte CSF" - - +