diff --git a/src/components/ReferralBlock/ReferralBlock.mdx b/src/components/ReferralBlock/ReferralBlock.mdx new file mode 100644 index 00000000..0cffe82a --- /dev/null +++ b/src/components/ReferralBlock/ReferralBlock.mdx @@ -0,0 +1,44 @@ +import { Meta, Canvas } from '@storybook/blocks'; + +import * as ReferralBlockStories from './ReferralBlock.stories.svelte'; + + + +# ReferralBlock + +The `ReferralBlock` component creates a set of referral links from recent Reuters.com stories using the [recent stories by section API](https://www.reuters.com/pf/api/v3/content/fetch/recent-stories-by-sections-v1?query=%7B%22section_ids%22%3A%22%2Fworld%2F%22%2C%22size%22%3A20%2C%22website%22%3A%22reuters%22%7D). + +> Note: The `section` or `collection` prop determines which section or collection stories are from. +> +> You can get the section ID from the URL for the Reuters.com section pages. For example, the section ID for [World - Europe](https://www.reuters.com/world/europe/) stories at `www.reuters.com/world/europe/` would be `/world/europe/`. (The leading and trailing slashes are required!) +> +> You should get the collection alias from the dotcom team. + +```svelte + + + +``` + + + +## Collections + +TK - Check if this is still relevant. + +```svelte + + + +``` + + +``` diff --git a/src/components/ReferralBlock/ReferralBlock.stories.svelte b/src/components/ReferralBlock/ReferralBlock.stories.svelte index f0177b39..966575fd 100644 --- a/src/components/ReferralBlock/ReferralBlock.stories.svelte +++ b/src/components/ReferralBlock/ReferralBlock.stories.svelte @@ -1,17 +1,10 @@ - - - - diff --git a/src/components/ReferralBlock/ReferralBlock.svelte b/src/components/ReferralBlock/ReferralBlock.svelte index f1a4ec3f..f1e49c90 100644 --- a/src/components/ReferralBlock/ReferralBlock.svelte +++ b/src/components/ReferralBlock/ReferralBlock.svelte @@ -1,65 +1,70 @@ - - - -``` diff --git a/src/components/ReferralBlock/stories/docs/component.md b/src/components/ReferralBlock/stories/docs/component.md deleted file mode 100644 index 61bb9141..00000000 --- a/src/components/ReferralBlock/stories/docs/component.md +++ /dev/null @@ -1,15 +0,0 @@ -The `ReferralBlock` component creates a set of referral links from recent dotcom stories using the [recent stories by section API](https://www.reuters.com/pf/api/v3/content/fetch/recent-stories-by-sections-v1?query=%7B%22section_ids%22%3A%22%2Fworld%2F%22%2C%22size%22%3A20%2C%22website%22%3A%22reuters%22%7D) or the [articles by collection API](https://www.reuters.com/pf/api/v3/content/fetch/articles-by-collection-alias-or-id-v1?query=%7B%22collection_alias%22%3A%22x-trump%22%2C%22size%22%3A20%2C%22website%22%3A%22reuters%22%7D). - -> The `section` or `collection` prop determines which section or collection stories are from. -> -> You can get the section ID from the section page on dotcom. For example, the section ID for World - Europe stories at `www.reuters.com/world/europe/` would be `/world/europe/`. (The leading and trailing slashes are required!) -> -> You should get a collection alias from the dotcom team. - -```svelte - - - -```