updates dependencies, adds examples to docs

This commit is contained in:
MinamiFunakoshiTR 2025-03-10 09:51:01 -07:00
parent 93c07569e3
commit f03ef9e2dc
Failed to extract signature
3 changed files with 8 additions and 6 deletions

View file

@ -6,7 +6,7 @@ import * as BylineStories from './Byline.stories.svelte';
# Byline
Easily add a byline and dateline to your story.
The `Byline` component adds a byline, published and updated datelines to your page.
```svelte
<script>
@ -25,9 +25,11 @@ Easily add a byline and dateline to your story.
/>
```
## Cutom byline, published and updated datelines
<Canvas of={BylineStories.Demo} />
You can customise the byline, published and updated datelines using [snippets](https://svelte.dev/docs/svelte/snippet), which are the Svelte 5 version of slots. You can pass any string or html as snippets.
## Cutomisation
Use [snippets](https://svelte.dev/docs/svelte/snippet) to customise the byline, published and updated datelines.
```svelte
<Byline publishTime="2021-09-12T00:00:00Z" updateTime="2021-09-12T13:57:00Z">

View file

@ -30,7 +30,7 @@
}}
/>
<Story name="Customised">
<Story name="Customised" tags={['!autodocs', '!dev']}>
<Byline publishTime="2021-09-12T00:00:00Z" updateTime="2021-09-12T13:57:00Z">
{#snippet byline()}
<strong>BY REUTERS GRAPHICS</strong>

View file

@ -56,8 +56,8 @@
let {
authors = [],
publishTime = '',
updateTime = '',
publishTime,
updateTime,
align = 'left',
id = '',
cls = '',