Merge pull request #121 from reuters-graphics/doc-fixes

Docs fixes and chromatic ignore header in hero headline
This commit is contained in:
Jon McClure 2023-09-18 18:56:38 +01:00 committed by GitHub
commit 804f69a8e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 15 deletions

View file

@ -3,10 +3,10 @@ interface EndNote {
Text: String;
}
type Block = EndNote[];
type EndNotes = EndNote[];
export const getEndNotesPropsFromDoc = (docBlock: Block) => {
return docBlock.map((d) => {
export const getEndNotesPropsFromDoc = (endNotes: EndNotes) => {
return endNotes.map((d) => {
return {
title: d.Title,
text: d.Text,

View file

@ -1,10 +1,8 @@
Note text includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.
Note text can be fed a markdown string, but text styling is intentionally restricted in this component. For example, all heading tags are forced to a single font size and weight.
End notes includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.
```svelte
<script>
import { NoteText } from '@reuters-graphics/graphics-components';
import { EndNotes } from '@reuters-graphics/graphics-components';
const notes = [
{
@ -22,5 +20,5 @@ Note text can be fed a markdown string, but text styling is intentionally restri
];
</script>
<NoteText notes="{notes}" />
<EndNotes notes="{notes}" />
```

View file

@ -67,7 +67,7 @@
/>
<Template let:args>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -88,7 +88,7 @@
<Story name="With transparent header" {...withStoryDocs(transparentHeaderDocs)}>
<div class="transparent-header">
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -104,7 +104,7 @@
</Story>
<Story name="With backdrop graphic" {...withStoryDocs(backgroundGraphicDocs)}>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -178,7 +178,7 @@
</Story>
<Story name="With backdrop video" {...withStoryDocs(videoDocs)}>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -223,7 +223,7 @@
</Story>
<Story name="With inline photo" {...withStoryDocs(inlinePhotoDocs)}>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -249,7 +249,7 @@
</Story>
<Story name="With inline graphic" {...withStoryDocs(inlineGraphicDocs)}>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>
@ -278,7 +278,7 @@
</Story>
<Story name="With inline video" {...withStoryDocs(inlinePhotoDocs)}>
<Block width="fluid">
<Block width="fluid" class="chromatic-ignore">
<SiteHeader />
</Block>