Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556<script lang="ts"> import Card, { type CardVariants } from "$lib/components/ui/Card.svelte"; import type { Component, Snippet } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements";
interface Props { message: string; messageDirection: string; icon?: Component<SvelteHTMLElements["svg"]>; border?: CardVariants["border"]; background?: CardVariants["background"]; size?: "default" | "inline"; class?: string; children?: Snippet; }
let { message, messageDirection = "horizontal", icon, border = true, background = true, size = "default", class: className, children }: Props = $props();
const Icon = $derived(icon);</script>
{#if size === "inline"} <p class={[ "flex items-center gap-xs typography-paragraph-regular text-foreground-muted", className ]} > {message}{@render children?.()} </p>{:else} <Card {border} {background} padding="none" rounded={false} class="flex flex-col items-center justify-center gap-xl p-4xl typography-paragraph-large text-foreground-subtle" > {#if Icon} <Icon class="size-16 text-foreground-disabled" aria-hidden="true" /> {/if} <span class="flex items-center gap-sm {messageDirection === 'vertical' && 'flex-col'}" >{message}{@render children?.()}</span > </Card>{/if}