diff --git a/components/src/Caption/Caption.svelte b/components/src/Caption/Caption.svelte index f63fb788..e7dcd870 100644 --- a/components/src/Caption/Caption.svelte +++ b/components/src/Caption/Caption.svelte @@ -6,10 +6,10 @@ as?: string; children?: Snippet; } - let { weight = 'regular', as = 'div', children }: CaptionProps = $props(); + let { weight = 'regular', as = 'div', children, ...rest }: CaptionProps = $props(); - + {@render children?.()} diff --git a/components/src/Copy/Copy.svelte b/components/src/Copy/Copy.svelte index bae63ad1..e3ca705b 100644 --- a/components/src/Copy/Copy.svelte +++ b/components/src/Copy/Copy.svelte @@ -6,10 +6,10 @@ as?: string; children?: Snippet; } - let { as = 'div', weight = 'regular', children }: CopyProps = $props(); + let { as = 'div', weight = 'regular', children, ...rest }: CopyProps = $props(); - + {@render children?.()} diff --git a/components/src/Headline/Headline.stories.svelte b/components/src/Headline/Headline.stories.svelte index 8a761fdf..ce075e07 100644 --- a/components/src/Headline/Headline.stories.svelte +++ b/components/src/Headline/Headline.stories.svelte @@ -36,6 +36,23 @@ + { + const el = canvasElement.querySelector('h3'); + await step('Renders the rest prop', async () => { + expect(el).toHaveAttribute('id', 'foo'); + }); + }} +> + +
+ This should have an ID of "foo" +
+
+
+