diff options
Diffstat (limited to 'src/lib/components/SectionTitle.svelte')
| -rw-r--r-- | src/lib/components/SectionTitle.svelte | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/components/SectionTitle.svelte b/src/lib/components/SectionTitle.svelte new file mode 100644 index 0000000..be77a46 --- /dev/null +++ b/src/lib/components/SectionTitle.svelte @@ -0,0 +1,23 @@ +<script lang="ts"> + import type { Snippet } from 'svelte'; + + let { level = 2, children }: { level?: 2 | 3; children: Snippet } = $props(); +</script> + +<svelte:element this={level === 2 ? 'h2' : 'h3'}> + {@render children()} +</svelte:element> + +<style> + h2, + h3 { + font-size: 0.75rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.08em; + color: var(--accent); + margin: 1.25rem 0 0.5rem; + padding-left: 0.5rem; + border-left: 3px solid var(--accent); + } +</style> |
