-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The text component ensures consistent styling throughout the application.
- Loading branch information
Showing
11 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<blockquote class="mt-6 border-l-2 pl-6 italic"> | ||
<slot /> | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"> | ||
<slot /> | ||
</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h2 | ||
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0" | ||
> | ||
<slot /> | ||
</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight"> | ||
<slot /> | ||
</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h4 class="scroll-m-20 text-xl font-semibold tracking-tight"> | ||
<slot /> | ||
</h4> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="text-lg font-semibold"> | ||
<slot /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p class="text-xl text-muted-foreground"> | ||
<slot /> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p class="text-sm text-muted-foreground"> | ||
<slot /> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p class="leading-7 [&:not(:first-child)]:mt-6"> | ||
<slot /> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<small class="text-sm font-medium leading-none"> | ||
<slot /> | ||
</small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
import Blockquote from '$lib/components/typography/Blockquote.svelte'; | ||
import H1 from '$lib/components/typography/H1.svelte'; | ||
import H2 from '$lib/components/typography/H2.svelte'; | ||
import H3 from '$lib/components/typography/H3.svelte'; | ||
import H4 from '$lib/components/typography/H4.svelte'; | ||
import Lead from '$lib/components/typography/Lead.svelte'; | ||
import Large from '$lib/components/typography/Large.svelte'; | ||
import Muted from '$lib/components/typography/Muted.svelte'; | ||
import P from '$lib/components/typography/P.svelte'; | ||
import Small from '$lib/components/typography/Small.svelte'; | ||
const textMapping = { | ||
blockquote: Blockquote, | ||
h1: H1, | ||
h2: H2, | ||
h3: H3, | ||
h4: H4, | ||
lead: Lead, | ||
large: Large, | ||
muted: Muted, | ||
p: P, | ||
small: Small | ||
}; | ||
export let type: keyof typeof textMapping; | ||
</script> | ||
|
||
<svelte:component this={textMapping[type]}> | ||
<slot /> | ||
</svelte:component> |