working on the frontend

This commit is contained in:
maxDorninger
2025-04-27 18:04:50 +02:00
parent 4fc2461d7f
commit 180771882d
111 changed files with 6187 additions and 151 deletions

View File

@@ -0,0 +1,16 @@
<script lang="ts">
import {Avatar as AvatarPrimitive} from "bits-ui";
import {cn} from "$lib/utils.js";
let {
class: className,
ref = $bindable(null),
...restProps
}: AvatarPrimitive.FallbackProps = $props();
</script>
<AvatarPrimitive.Fallback
{...restProps}
bind:ref
class={cn("bg-muted flex size-full items-center justify-center", className)}
/>

View File

@@ -0,0 +1,20 @@
<script lang="ts">
import {Avatar as AvatarPrimitive} from "bits-ui";
import {cn} from "$lib/utils.js";
let {
class: className,
src,
alt,
ref = $bindable(null),
...restProps
}: AvatarPrimitive.ImageProps = $props();
</script>
<AvatarPrimitive.Image
{...restProps}
{alt}
bind:ref
class={cn("aspect-square size-full", className)}
{src}
/>

View File

@@ -0,0 +1,18 @@
<script lang="ts">
import {Avatar as AvatarPrimitive} from "bits-ui";
import {cn} from "$lib/utils.js";
let {
class: className,
ref = $bindable(null),
loadingStatus = $bindable("loading"),
...restProps
}: AvatarPrimitive.RootProps = $props();
</script>
<AvatarPrimitive.Root
{...restProps}
bind:loadingStatus
bind:ref
class={cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", className)}
/>

View File

@@ -0,0 +1,13 @@
import Root from "./avatar.svelte";
import Image from "./avatar-image.svelte";
import Fallback from "./avatar-fallback.svelte";
export {
Root,
Image,
Fallback,
//
Root as Avatar,
Image as AvatarImage,
Fallback as AvatarFallback,
};