@communitiesuk/svelte-component-library 0.1.19-beta.21 → 0.1.19-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import homepageIllustration from "./../../assets/images/homepage-illustration.svg";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
3
4
|
|
|
4
5
|
// Define component props with types and default values
|
|
5
6
|
let {
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
paddingTop = "30px",
|
|
17
18
|
titlePaddingTop = false,
|
|
18
19
|
paddingBottom = "30px",
|
|
20
|
+
contentSnippet = undefined,
|
|
19
21
|
} = $props<{
|
|
20
22
|
title?: string;
|
|
21
23
|
description?: string;
|
|
@@ -30,7 +32,10 @@
|
|
|
30
32
|
paddingTop?: string;
|
|
31
33
|
titlePaddingTop?: boolean;
|
|
32
34
|
paddingBottom?: string;
|
|
35
|
+
contentSnippet?: Snippet;
|
|
33
36
|
}>();
|
|
37
|
+
|
|
38
|
+
let arg = "hello";
|
|
34
39
|
</script>
|
|
35
40
|
|
|
36
41
|
<div
|
|
@@ -46,6 +51,9 @@
|
|
|
46
51
|
>
|
|
47
52
|
<h1 class="govuk-heading-xl app-masthead__title">{@html title}</h1>
|
|
48
53
|
<p class="app-masthead__description">{description}</p>
|
|
54
|
+
{#if contentSnippet}
|
|
55
|
+
{@render contentSnippet()}
|
|
56
|
+
{/if}
|
|
49
57
|
{#if includeButton === true}
|
|
50
58
|
<a
|
|
51
59
|
href={buttonHref}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
1
2
|
type $$ComponentProps = {
|
|
2
3
|
title?: string;
|
|
3
4
|
description?: string;
|
|
@@ -12,6 +13,7 @@ type $$ComponentProps = {
|
|
|
12
13
|
paddingTop?: string;
|
|
13
14
|
titlePaddingTop?: boolean;
|
|
14
15
|
paddingBottom?: string;
|
|
16
|
+
contentSnippet?: Snippet;
|
|
15
17
|
};
|
|
16
18
|
declare const Masthead: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
17
19
|
type Masthead = ReturnType<typeof Masthead>;
|