2026-03-02 22:19:35 +03:00
|
|
|
<!--
|
|
|
|
|
Component: ControlGroup
|
|
|
|
|
Labeled container for form controls
|
|
|
|
|
-->
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
|
|
|
|
import type { Snippet } from 'svelte';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
/**
|
|
|
|
|
* Group label
|
|
|
|
|
*/
|
|
|
|
|
label: string;
|
|
|
|
|
/**
|
|
|
|
|
* Content snippet
|
|
|
|
|
*/
|
|
|
|
|
children: Snippet;
|
|
|
|
|
/**
|
|
|
|
|
* CSS classes
|
|
|
|
|
*/
|
|
|
|
|
class?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { label, children, class: className }: Props = $props();
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-04-16 16:32:41 +03:00
|
|
|
<div class={cn('flex flex-col gap-3 py-6 border-b border-subtle last:border-0', className)}>
|
2026-04-17 09:41:55 +03:00
|
|
|
<div class="flex justify-between items-center text-xs font-primary font-bold tracking-tight text-neutral-900 dark:text-neutral-100 uppercase leading-none">
|
2026-03-02 22:19:35 +03:00
|
|
|
{label}
|
|
|
|
|
</div>
|
|
|
|
|
{@render children?.()}
|
|
|
|
|
</div>
|