hypnagaga/packages/graphics-components/docs/assets/SiteHeadline-ocHLGxUL.js

51 lines
2.9 KiB
JavaScript

import{j as e}from"./index-bIIEL2MP.js";import{useMDXComponents as s}from"./index-CO-0pc0F.js";import{M as r,C as i}from"./index-Z-6k0Xrj.js";import{S as a,D as c,A as l}from"./SiteHeadline.stories-BsS7Ule5.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./iframe-CzjIX-qr.js";import"./index-aQYXhgXp.js";import"./index-DrFu-skq.js";import"./props-b4vEeO_8.js";import"./runtime-C3rQLW--.js";import"./lifecycle-F2p_Qkk3.js";import"./create-runtime-stories-7AWWVphH.js";import"./snippet-C5kbqVpq.js";import"./svelte-component-C8Ginrj8.js";import"./get-C3XmtPLd.js";import"./attributes-Cg6aLqN3.js";import"./style-DvJ3IcV1.js";import"./Block-D3Ui8rd-.js";import"./Byline-BhU2Zjcl.js";import"./each-CVpBMMjG.js";import"./index-CX1x869l.js";import"./journalize-K6hK94UL.js";function o(t){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...s(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{of:a}),`
`,e.jsx(n.h1,{id:"siteheadline",children:"SiteHeadline"}),`
`,e.jsxs(n.p,{children:["The ",e.jsx(n.code,{children:"SiteHeadline"})," component creates a simplified Reuters Graphics headline, loosely modelled off the Reuters.com styles."]}),`
`,e.jsx(n.p,{children:"Styles for this headline are intentionally restricted. It is meant to serve as a unifying style for quick-turnaround breaking news pages."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-svelte",children:`<script>
import { SiteHeadline } from '@reuters-graphics/graphics-components';
<\/script>
<SiteHeadline
hed="Ukraine makes suprising gains in swift counteroffensive"
authors={[
'Dea Bankova',
'Michael Ovaska',
'Samuel Granados',
'Prasanta Kumar Dutta',
]}
publishTime="2021-09-12T00:00:00.000Z"
updateTime="2021-09-12T12:57:00.000Z"
/>
`})}),`
`,e.jsx(i,{of:c}),`
`,e.jsx(n.h2,{id:"using-with-archieml-docs",children:"Using with ArchieML docs"}),`
`,e.jsx(n.p,{children:"With the graphics kit, you'll likely get your text value from an ArchieML doc..."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-yaml",children:`# ArchieML doc
section: Global News # Optional
sectionUrl: https://www.reuters.com/graphics/ # Optional
hed: A beautiful page
[authors]
* Samuel Granados
* Dea Bankova
[]
published: 2022-09-12T08:30:00.000Z
updated:
`})}),`
`,e.jsxs(n.p,{children:["... which you'll pass to the ",e.jsx(n.code,{children:"SiteHeadline"})," component."]}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-svelte",children:`<!-- App.svelte -->
<script>
import { SiteHeadline } from '@reuters-graphics/graphics-components';
import content from '$locales/en/content.json';
<\/script>
<SiteHeadline
section={content.section}
sectionUrl={content.sectionUrl}
hed={content.hed}
authors={content.authors.split(',')}
publishTime={content.publishTime}
updateTime={content.updatTime}
/>
`})}),`
`,e.jsx(i,{of:l})]})}function U(t={}){const{wrapper:n}={...s(),...t.components};return n?e.jsx(n,{...t,children:e.jsx(o,{...t})}):o(t)}export{U as default};