2023-07-18 00:53:23 +08:00
|
|
|
<script>
|
2023-08-04 06:01:18 +08:00
|
|
|
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
|
|
|
|
import Markdown from "./static";
|
2023-07-18 00:53:23 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<Meta
|
|
|
|
title="Components/Markdown"
|
|
|
|
component={Markdown}
|
|
|
|
argTypes={{
|
|
|
|
rtl: {
|
|
|
|
options: [true, false],
|
|
|
|
description: "Whether to render right-to-left",
|
|
|
|
control: { type: "boolean" },
|
|
|
|
defaultValue: false
|
2023-08-04 06:01:18 +08:00
|
|
|
}
|
2023-07-18 00:53:23 +08:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Template let:args>
|
|
|
|
<Markdown
|
|
|
|
{...args}
|
|
|
|
value="Here's some <strong>bold</strong> text. And some <em>italics</em> and some <code>code</code>"
|
|
|
|
/>
|
|
|
|
</Template>
|
|
|
|
|
2023-08-04 06:01:18 +08:00
|
|
|
<Story name="Simple inline Markdown with HTML" />
|
|
|
|
<Story name="Right aligned Markdown with HTML" args={{ rtl: true }} />
|