Files
gpx.studio/website/src/lib/components/ui/card/card.svelte

24 lines
491 B
Svelte
Raw Normal View History

2024-04-19 16:13:08 +02:00
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
2025-06-21 21:07:36 +02:00
import { cn, type WithElementRef } from "$lib/utils.js";
2024-04-19 16:13:08 +02:00
2025-06-08 16:32:41 +02:00
let {
ref = $bindable(null),
class: className,
children,
...restProps
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
2024-04-19 16:13:08 +02:00
</script>
<div
2025-06-08 16:32:41 +02:00
bind:this={ref}
2025-06-21 21:07:36 +02:00
data-slot="card"
class={cn(
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
className
)}
2025-06-08 16:32:41 +02:00
{...restProps}
2024-04-19 16:13:08 +02:00
>
2025-06-08 16:32:41 +02:00
{@render children?.()}
2024-04-19 16:13:08 +02:00
</div>