diff --git a/src/components/EndNotes/EndNotes.mdx b/src/components/EndNotes/EndNotes.mdx new file mode 100644 index 00000000..3ab4a92f --- /dev/null +++ b/src/components/EndNotes/EndNotes.mdx @@ -0,0 +1,61 @@ +import { Meta } from '@storybook/blocks'; + +import * as EndNotesStories from './EndNotes.stories.svelte'; + + + +# EndNotes + +End notes includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story. + +Use it like this: + +```svelte + + + +``` + +... or more commonly, you'll use it with a **ArchieML doc** in the **Graphics Kit** like this: + +```yaml +# ArchieML doc +[endNotes] +title: Note +text: Data is current as of today + +title: Sources +text: Data, Inc. + +title: Edited by +text: Editor, Copyeditor +[] +``` + +```svelte + + + + +``` diff --git a/src/components/EndNotes/EndNotes.stories.svelte b/src/components/EndNotes/EndNotes.stories.svelte index 0a78b84f..19792051 100644 --- a/src/components/EndNotes/EndNotes.stories.svelte +++ b/src/components/EndNotes/EndNotes.stories.svelte @@ -1,20 +1,15 @@ - - - + diff --git a/src/components/EndNotes/EndNotes.svelte b/src/components/EndNotes/EndNotes.svelte index 5917b29f..019be9ab 100644 --- a/src/components/EndNotes/EndNotes.svelte +++ b/src/components/EndNotes/EndNotes.svelte @@ -7,21 +7,17 @@ title: string; /** * Contents of the note as a markdown string - * @required */ text: string; } - - import Block from '../Block/Block.svelte'; import Markdown from '../Markdown/Markdown.svelte'; interface Props { /** - * An array of endnote items. - * @required - */ - notes?: EndNote[]; + * An array of endnote items. + */ + notes: EndNote[]; } let { notes = [] }: Props = $props(); @@ -31,16 +27,15 @@ {#if notes} {#each notes as note}
- +
- +
{/each} {/if} -