hypnagaga/packages/graphics-components/docs/assets/Byline.stories-CX-euSiO.js

11 lines
2.4 KiB
JavaScript

import{f as r,a as s,t as f}from"./props-b4vEeO_8.js";import{B as h,C as y,k as C,D as T,F as p,G as B}from"./runtime-C3rQLW--.js";import{i as b}from"./lifecycle-F2p_Qkk3.js";import{c as S,d as D}from"./create-runtime-stories-7AWWVphH.js";import{B as d}from"./Byline-BhU2Zjcl.js";const l={title:"Components/Text elements/Byline",component:d,tags:["autodocs"],argTypes:{align:{control:"select",options:["auto","center"]}}},{Story:o}=D();var P=r("<strong>BY REUTERS GRAPHICS</strong>"),A=r("<em>Updated every 5 minutes</em>"),R=r("<!> <!> <!>",1);function c(g,_){h(_,!1),b();var i=R(),m=y(i);{let e=T(()=>({authors:["Dea Bankova","Prasanta Kumar Dutta","Anurag Rao","Mariano Zafra"],publishTime:new Date("2021-09-12").toISOString(),updateTime:new Date("2021-09-12T13:57:00").toISOString()}));o(m,{name:"Demo",get args(){return C(e)},parameters:{__svelteCsf:{rawCode:"<Byline {...args} />"}}})}var u=p(m,2);o(u,{name:"Customised",tags:["!autodocs","!dev"],children:(e,w)=>{d(e,{publishTime:"2021-09-12T00:00:00Z",updateTime:"2021-09-12T13:57:00Z",byline:t=>{var a=P();s(t,a)},published:t=>{var a=f("PUBLISHED on some custom date and time");s(t,a)},updated:t=>{var a=A();s(t,a)},$$slots:{byline:!0,published:!0,updated:!0}})},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`<Byline publishTime="2021-09-12T00:00:00Z" updateTime="2021-09-12T13:57:00Z">
{#snippet byline()}
<strong>BY REUTERS GRAPHICS</strong>
{/snippet}
{#snippet published()}
PUBLISHED on some custom date and time
{/snippet}
{#snippet updated()}
<em>Updated every 5 minutes</em>
{/snippet}
</Byline>`}}});var v=p(u,2);o(v,{name:"Custom author page",exportName:"CustomAuthorPage",tags:["!autodocs","!dev"],args:{authors:["Dea Bankova","Prasanta Kumar Dutta","Anurag Rao","Mariano Zafra"],publishTime:"2021-09-12T00:00:00Z",updateTime:"2021-09-12T13:57:00Z",getAuthorPage:e=>`mailto:${e.replace(" ","")}@example.com`},parameters:{__svelteCsf:{rawCode:"<Byline {...args} />"}}}),s(g,i),B()}c.__docgen={version:3,name:"Byline.stories.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const n=S(c,l),$=["Demo","Customised","CustomAuthorPage"],Z=n.Demo,x=n.Customised,E=n.CustomAuthorPage,K=Object.freeze(Object.defineProperty({__proto__:null,CustomAuthorPage:E,Customised:x,Demo:Z,__namedExportsOrder:$,default:l},Symbol.toStringTag,{value:"Module"}));export{K as B,x as C,Z as D,E as a};