Files
illusory-iotam/apps/frontend/src/lib/components/ui/button-group/button-group-text.svelte
user eee31e5b99 Replace front proxy with new SvelteKit frontend app
- Remove the old Hono/Bun proxy server
- Add the new `apps/frontend` SvelteKit scaffold and telemetry hook
2026-03-28 18:12:43 +02:00

31 lines
782 B
Svelte

<script lang="ts">
import { cn, type WithElementRef } from "$lib/utils.js";
import type { HTMLAttributes } from "svelte/elements";
import type { Snippet } from "svelte";
let {
ref = $bindable(null),
class: className,
child,
...restProps
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
child?: Snippet<[{ props: Record<string, unknown> }]>;
} = $props();
const mergedProps = $derived({
...restProps,
class: cn(
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
className
),
});
</script>
{#if child}
{@render child({ props: mergedProps })}
{:else}
<div bind:this={ref} {...mergedProps}>
{@render mergedProps.children?.()}
</div>
{/if}