diff --git a/src/components/Markdown/stories/docs/component.md b/src/components/Markdown/Markdown.mdx similarity index 84% rename from src/components/Markdown/stories/docs/component.md rename to src/components/Markdown/Markdown.mdx index 5ba4ae0a..be7b5a37 100644 --- a/src/components/Markdown/stories/docs/component.md +++ b/src/components/Markdown/Markdown.mdx @@ -1,15 +1,23 @@ -The Markdown component renders markdown into HTML. That's it! +import { Meta, Canvas } from '@storybook/blocks'; ---- +import * as MarkdownStories from './Markdown.stories.svelte'; + + + +# Markdown + +The `Markdown` component renders a markdown string into HTML. ```svelte - + ``` + + ... well, almost. Owing to a weird quirk of Svelte's [`@html`](https://svelte.dev/docs/special-tags#html) directive (see [this issue](https://github.com/reuters-graphics/graphics-components/issues/148)), if you want your resulting HTML to be dynamic — e.g., update after a SvelteKit app [hydrates](https://kit.svelte.dev/docs/glossary#hydration) — then you may need to set the included `$staticMarkdown` store to `false` in the browser. diff --git a/src/components/Markdown/Markdown.stories.svelte b/src/components/Markdown/Markdown.stories.svelte index 99464d60..5c55660a 100644 --- a/src/components/Markdown/Markdown.stories.svelte +++ b/src/components/Markdown/Markdown.stories.svelte @@ -1,35 +1,16 @@ - - - -