import { Meta, Canvas } from '@storybook/blocks'; import * as InfoBoxStories from './InfoBox.stories.svelte'; # InfoBox The `InfoBox` component creates a stylised text box that provides additional information that needs to be visually separate from the main content flow, such as methodology, detailed notes about data and extra context. ```svelte ``` ## Using with ArchieML docs With the graphics kit, you'll likely get your text value from an ArchieML doc... ```yaml # Archie ML doc [blocks] type: info-box title: What you need to know about the war text: Reuters is collecting daily COVID-19 infections and deaths data for 240 countries and territories around the world, updated regularly throughout each day. Every country reports those figures a little differently and, inevitably, misses undiagnosed infections and deaths. With this project we are focusing on the trends within countries as they try to contain the virus’ spread, whether they are approaching or past peak infection rates, or if they are seeing a resurgence of infections or deaths. :end notes: [Read more about our methodology](https://www.reuters.com/world-coronavirus-tracker-and-maps/en/methodology/) [] ``` ... which you'll parse out of a ArchieML block object before passing to the `InfoBox` component. ```svelte # Graphics Kit {#each content.blocks as block} {#if block.type === 'info-box'} {/if} {/each} ``` ## Lists Use markdown to add lists to `InfoBox`. ```svelte ``` ## Customisation Use [snippets](https://svelte.dev/docs/svelte/snippet) to customise the `InfoBox`, such as adding tables, icons and thumbnail images. ```svelte {#snippet header()}

Global video game market

{/snippet} {#snippet body()}
Year Market size ($bln)
2024 274.63
2023 281.77
2022 249.55
{/snippet} {#snippet updated()}
Source: Precedence Research
{/snippet}
```