migrates reuters logo

This commit is contained in:
MinamiFunakoshiTR 2025-03-10 15:55:13 -07:00
parent 8402b1fdbe
commit b901bb3c36
Failed to extract signature
4 changed files with 43 additions and 48 deletions

View file

@ -0,0 +1,19 @@
import { Meta, Canvas } from '@storybook/blocks';
import * as ReutersLogoStories from './ReutersLogo.stories.svelte';
<Meta of={ReutersLogoStories} />
# ReutersLogo
The `ReutersLogo` component contains the official Reuters logo.
```svelte
<script>
import { ReutersLogo } from '@reuters-graphics/graphics-components';
</script>
<ReutersLogo />
```
<Canvas of={ReutersLogoStories.Demo} />

View file

@ -1,30 +1,15 @@
<script module lang="ts">
// @ts-ignore raw
import componentDocs from './stories/docs/component.md?raw';
import { defineMeta } from '@storybook/addon-svelte-csf';
import ReutersLogo from './ReutersLogo.svelte';
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
export const meta = {
const { Story } = defineMeta({
title: 'Components/Logos/ReutersLogo',
component: ReutersLogo,
...withComponentDocs(componentDocs),
argTypes: {
logoColour: { control: 'color' },
textColour: { control: 'color' },
},
};
});
</script>
<script>
import { Template, Story } from '@storybook/addon-svelte-csf';
</script>
<Template >
{#snippet children({ args })}
<ReutersLogo {...args} />
{/snippet}
</Template>
<Story name="Default" />
<Story name="Demo" />

View file

@ -1,8 +1,5 @@
<!-- @component `ReutersLogo` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-logos-reuterslogo--docs) -->
<script lang="ts">
interface Props {
/** "Kinesis" colour */
logoColour?: string;
@ -12,7 +9,11 @@
width?: string;
}
let { logoColour = '#D64000', textColour = '#212223', width = '100%' }: Props = $props();
let {
logoColour = '#D64000',
textColour = '#212223',
width = '100%',
}: Props = $props();
</script>
<svg
@ -21,22 +22,6 @@
viewBox="0 0 1760.4 558.7"
style="width: {width}; --logoColour: {logoColour}; --textColour: {textColour};"
>
<defs>
<style>
.cls-1 {
fill: var(--logoColour);
}
.cls-1,
.cls-2 {
stroke-width: 0px;
}
.cls-2 {
fill: var(--textColour);
}
</style>
</defs>
<g id="Primary_Logo" data-name="Primary Logo">
<g>
<g>
@ -186,3 +171,18 @@
</g>
</g>
</svg>
<style>
.cls-1 {
fill: var(--logoColour);
}
.cls-1,
.cls-2 {
stroke-width: 0px;
}
.cls-2 {
fill: var(--textColour);
}
</style>

View file

@ -1,9 +0,0 @@
The official Reuters logo.
```svelte
<script>
import { ReutersLogo } from '@reuters-graphics/graphics-components';
</script>
<ReutersLogo />
```