can remove graphics referrals from footer
This commit is contained in:
parent
3c1d1e976b
commit
499cff9a69
3 changed files with 25 additions and 1 deletions
|
|
@ -7,6 +7,8 @@
|
|||
import darkThemeDocs from './stories/docs/darkTheme.md?raw';
|
||||
// @ts-ignore
|
||||
import customReferralsDocs from './stories/docs/customReferrals.md?raw';
|
||||
// @ts-ignore
|
||||
import removeReferralsDocs from './stories/docs/removeReferrals.md?raw';
|
||||
|
||||
import SiteFooter from './SiteFooter.svelte';
|
||||
import Theme from '../Theme/Theme.svelte';
|
||||
|
|
@ -64,6 +66,12 @@
|
|||
{...withStoryDocs(customReferralsDocs)}
|
||||
/>
|
||||
|
||||
<Story
|
||||
name="Remove referrals"
|
||||
args="{{ includeReferrals: false }}"
|
||||
{...withStoryDocs(removeReferralsDocs)}
|
||||
/>
|
||||
|
||||
<style>
|
||||
div {
|
||||
width: calc(100% + 30px);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@
|
|||
*/
|
||||
export let referrals: Referral[] = [];
|
||||
|
||||
/**
|
||||
* Set to `false` to remove graphics referrals
|
||||
*/
|
||||
export let includeReferrals = true;
|
||||
|
||||
let data = starterData;
|
||||
|
||||
onMount(async () => {
|
||||
|
|
@ -54,7 +59,9 @@
|
|||
`}"
|
||||
>
|
||||
<div>
|
||||
<Referrals referrals="{referrals}" />
|
||||
{#if includeReferrals}
|
||||
<Referrals referrals="{referrals}" />
|
||||
{/if}
|
||||
<QuickLinks links="{data[0]}" />
|
||||
<CompanyLinks links="{data[0]}" />
|
||||
<LegalLinks links="{data[0]}" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
Remove graphics referrals.
|
||||
|
||||
```svelte
|
||||
<script>
|
||||
import { SiteFooter } from '@reuters-graphics/graphics-components';
|
||||
</script>
|
||||
|
||||
<SiteFooter includeReferrals="{false}" />
|
||||
```
|
||||
Loading…
Reference in a new issue