-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add published URL and source to document metadata
- Loading branch information
1 parent
dcfe1bf
commit d4876f4
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/lib/components/documents/stories/Metadata.stories.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script context="module" lang="ts"> | ||
import { Story, Template } from "@storybook/addon-svelte-csf"; | ||
import MetadataComponent from "../Metadata.svelte"; | ||
import type { Document } from "@/lib/api/types"; | ||
import doc from "@/test/fixtures/documents/document-expanded.json"; | ||
const document = doc as Document; | ||
export const meta = { | ||
title: "Components / Documents / Metadata", | ||
component: MetadataComponent, | ||
parameters: { | ||
layout: "centered", | ||
}, | ||
}; | ||
const args = { | ||
document: { | ||
...document, | ||
source: "NYPD", | ||
published_url: | ||
"https://www.nytimes.com/live/2024/12/10/nyregion/unitedhealthcare-ceo-luigi-mangione", | ||
}, | ||
}; | ||
</script> | ||
|
||
<Template let:args> | ||
<MetadataComponent {...args} /> | ||
</Template> | ||
|
||
<Story name="Metadata" {args} /> |