blob: 87a19b1232e93e0ad8b7134c9f2be5686c712d04 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<script>
export let closable = true;
export let show = false;
</script>
<div class="pre-header padding-y-xs" style="{show ? '' : 'display:none'}">
<div class="container max-width-lg position-relative">
<div class="text-component text-sm padding-right-lg">
<p>
<slot/>
</p>
</div>
{#if closable}
<button class="reset pre-header__close-btn"
on:click={(event) => event.target.closest(".pre-header")?.remove()}>
<svg class="icon"
viewBox="0 0 20 20">
<title>Close header banner</title>
<g fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2">
<line x1="4"
y1="4"
x2="16"
y2="16"/>
<line x1="16"
y1="4"
x2="4"
y2="16"/>
</g>
</svg>
</button>
{/if}
</div>
</div>
|