-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
142 additions
and
2 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,17 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className, | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLDivElement> = $props(); | ||
</script> | ||
|
||
<div class={cn("p-6 pt-0", className)} {...rest}> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</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,17 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className, | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLParagraphElement> = $props(); | ||
</script> | ||
|
||
<p class={cn("text-sm text-muted-foreground", className)} {...rest}> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</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,17 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className, | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLDivElement> = $props(); | ||
</script> | ||
|
||
<div class={cn("flex items-center p-6 pt-0", className)} {...rest}> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</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,17 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className, | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLDivElement> = $props(); | ||
</script> | ||
|
||
<div class={cn("flex flex-col space-y-1.5 p-6", className)} {...rest}> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</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,25 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import type { HeadingLevel } from "./index.js"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className = undefined, | ||
tag = "h3", | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLHeadingElement> & { | ||
tag?: HeadingLevel; | ||
} = $props(); | ||
</script> | ||
|
||
<svelte:element | ||
this={tag} | ||
class={cn("text-lg font-semibold leading-none tracking-tight", className)} | ||
{...rest} | ||
> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</svelte:element> |
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,23 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
const { | ||
class: className, | ||
children, | ||
...rest | ||
}: HTMLAttributes<HTMLDivElement> = $props(); | ||
</script> | ||
|
||
<div | ||
class={cn( | ||
"rounded-lg border bg-card text-card-foreground shadow-sm", | ||
className, | ||
)} | ||
{...rest} | ||
> | ||
{#if children} | ||
{@render children()} | ||
{/if} | ||
</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,24 @@ | ||
import Root from "./card.svelte"; | ||
import Content from "./card-content.svelte"; | ||
import Description from "./card-description.svelte"; | ||
import Footer from "./card-footer.svelte"; | ||
import Header from "./card-header.svelte"; | ||
import Title from "./card-title.svelte"; | ||
|
||
export { | ||
Root, | ||
Content, | ||
Description, | ||
Footer, | ||
Header, | ||
Title, | ||
// | ||
Root as Card, | ||
Content as CardContent, | ||
Description as CardDescription, | ||
Footer as CardFooter, | ||
Header as CardHeader, | ||
Title as CardTitle, | ||
}; | ||
|
||
export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6"; |
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