pass lint rules
This commit is contained in:
parent
528e24e772
commit
a14905f875
5 changed files with 38 additions and 33 deletions
|
|
@ -92,12 +92,17 @@ To hyperlink to different pages or email addresses, pass a custom function to th
|
||||||
```svelte
|
```svelte
|
||||||
<!-- Pass a custom function as `getAuthorPage` -->
|
<!-- Pass a custom function as `getAuthorPage` -->
|
||||||
<Byline
|
<Byline
|
||||||
authors={['Dea Bankova', 'Prasanta Kumar Dutta', 'Anurag Rao', 'Mariano Zafra']}
|
authors={[
|
||||||
|
'Dea Bankova',
|
||||||
|
'Prasanta Kumar Dutta',
|
||||||
|
'Anurag Rao',
|
||||||
|
'Mariano Zafra',
|
||||||
|
]}
|
||||||
publishTime="2021-09-12T00:00:00Z"
|
publishTime="2021-09-12T00:00:00Z"
|
||||||
updateTime="2021-09-12T13:57:00Z"
|
updateTime="2021-09-12T13:57:00Z"
|
||||||
getAuthorPage={(author: string) => {
|
getAuthorPage={(author) => {
|
||||||
return `mailto:${author.replace(' ', '')}@example.com`;
|
return `mailto:${author.replace(' ', '')}@example.com`;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,9 +273,9 @@ Since `Headline` internally uses the [Byline](?path=/docs/components-text-elemen
|
||||||
]}
|
]}
|
||||||
publishTime={new Date('2023-05-11').toISOString()}
|
publishTime={new Date('2023-05-11').toISOString()}
|
||||||
img={eurovisImgSrc}
|
img={eurovisImgSrc}
|
||||||
getAuthorPage={(author: string) => {
|
getAuthorPage={(author) => {
|
||||||
return `mailto:${author.replace(' ', '')}@example.com`;
|
return `mailto:${author.replace(' ', '')}@example.com`;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<!-- Custom hed snippet -->
|
<!-- Custom hed snippet -->
|
||||||
{#snippet hed()}
|
{#snippet hed()}
|
||||||
|
|
|
||||||
|
|
@ -18,27 +18,27 @@ The `Scroller` component creates a basic scrollytelling graphic with layout opti
|
||||||
|
|
||||||
import MyBackground from './MyBackground.svelte'; // Your own background component
|
import MyBackground from './MyBackground.svelte'; // Your own background component
|
||||||
|
|
||||||
// Array of step objects that define the steps in your scroller.
|
// Array of step objects that define the steps in your scroller.
|
||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
background: MyBackground,
|
background: MyBackground,
|
||||||
backgroundProps: { colour: 'red' }, // Optional props for your background component
|
backgroundProps: { colour: 'red' }, // Optional props for your background component
|
||||||
foreground: '#### Step 1\n\nLorem ipsum red',
|
foreground: '#### Step 1\n\nLorem ipsum red',
|
||||||
altText: 'Red background',
|
altText: 'Red background',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
background: MyBackground,
|
background: MyBackground,
|
||||||
backgroundProps: { colour: 'blue' },
|
backgroundProps: { colour: 'blue' },
|
||||||
foreground: '#### Step 2\n\nLorem ipsum blue',
|
foreground: '#### Step 2\n\nLorem ipsum blue',
|
||||||
altText: 'Blue background',
|
altText: 'Blue background',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
background: MyBackground,
|
background: MyBackground,
|
||||||
backgroundProps: { colour: 'green' },
|
backgroundProps: { colour: 'green' },
|
||||||
foreground: '#### Step 3\n\nLorem ipsum green',
|
foreground: '#### Step 3\n\nLorem ipsum green',
|
||||||
altText: 'Green background',
|
altText: 'Green background',
|
||||||
},
|
},
|
||||||
],
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Scroller {steps} foregroundPosition="middle" backgroundWidth="fluid" />
|
<Scroller {steps} foregroundPosition="middle" backgroundWidth="fluid" />
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@ Set the `title`, `dek`, `notes` and `source` options to add supporting metadata
|
||||||
```svelte
|
```svelte
|
||||||
<Table
|
<Table
|
||||||
data={yourData}
|
data={yourData}
|
||||||
title='Career home run leaders'
|
title="Career home run leaders"
|
||||||
dek=`In baseball,
|
dek={`In baseball,
|
||||||
a home run (also known as a "dinger" or "tater") occurs when a batter hits the
|
a home run (also known as a "dinger" or "tater") occurs when a batter hits the
|
||||||
ball over the outfield fence. When a home run is hit, the batter and any runners
|
ball over the outfield fence. When a home run is hit, the batter and any runners
|
||||||
on base are able to score.`
|
on base are able to score.`}
|
||||||
notes='Note: As of Opening Day 2023'
|
notes="Note: As of Opening Day 2023"
|
||||||
source='Source: Baseball Reference'
|
source="Source: Baseball Reference"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue