svelte-exmarkdown
Version:
Svelte component to render markdown. Dynamic and Extensible.
15 lines (14 loc) • 512 B
TypeScript
import type { Snippet } from 'svelte';
import type { SvelteHTMLElements } from 'svelte/elements';
import type { Plugin } from './types';
import { type Tag } from './utils';
type SnippetRenderers = {
[T in Tag]?: T extends keyof SvelteHTMLElements ? Snippet<[SvelteHTMLElements[T]]> : never;
};
type Props = SnippetRenderers & {
md: string;
plugins?: Plugin[];
};
declare const Markdown: import("svelte").Component<Props, {}, "">;
type Markdown = ReturnType<typeof Markdown>;
export default Markdown;