sveltacular 0.0.62 → 0.0.63
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.
|
@@ -3,10 +3,11 @@ import Header from "../header/header.svelte";
|
|
|
3
3
|
export let title = void 0;
|
|
4
4
|
export let level = 2;
|
|
5
5
|
export let size = "full";
|
|
6
|
+
export let hidden = false;
|
|
6
7
|
setContext("section", { level, title });
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
|
-
<section class="level-{level} {size}">
|
|
10
|
+
<section class="level-{level} {size}" class:hidden>
|
|
10
11
|
{#if title}
|
|
11
12
|
<Header />
|
|
12
13
|
{/if}
|
|
@@ -19,6 +20,9 @@ setContext("section", { level, title });
|
|
|
19
20
|
margin-bottom: 1rem;
|
|
20
21
|
font-family: var(--base-font-family, sans-serif);
|
|
21
22
|
}
|
|
23
|
+
section.hidden {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
22
26
|
section.sm {
|
|
23
27
|
max-width: 25rem;
|
|
24
28
|
}
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
<script>export let transform = "none";
|
|
2
|
+
export let size = "md";
|
|
3
|
+
export let display = "block";
|
|
2
4
|
</script>
|
|
3
5
|
|
|
4
|
-
<div class={transform}>
|
|
5
|
-
|
|
6
|
+
<div class="{transform} {size} {display}">
|
|
7
|
+
{#if size === 'sm'}
|
|
8
|
+
<small><slot /></small>
|
|
9
|
+
{:else}
|
|
10
|
+
<slot />
|
|
11
|
+
{/if}
|
|
6
12
|
</div>
|
|
7
13
|
|
|
8
14
|
<style>div {
|
|
9
15
|
font-family: var(--base-font-family, sans-serif);
|
|
10
16
|
}
|
|
17
|
+
div.sm {
|
|
18
|
+
font-size: 60%;
|
|
19
|
+
}
|
|
20
|
+
div.lg {
|
|
21
|
+
font-size: 140%;
|
|
22
|
+
}
|
|
23
|
+
div.block {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
div.inline {
|
|
27
|
+
display: inline;
|
|
28
|
+
}
|
|
11
29
|
div.uppercase {
|
|
12
30
|
text-transform: uppercase;
|
|
13
31
|
}
|
|
@@ -2,6 +2,8 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
transform?: "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
6
|
+
display?: "block" | "inline" | undefined;
|
|
5
7
|
};
|
|
6
8
|
events: {
|
|
7
9
|
[evt: string]: CustomEvent<any>;
|