You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
638 B
23 lines
638 B
<script lang="ts">
|
|
import { ActiveEidos } from '$uix/eidos';
|
|
import * as Form from '$soma/components/form';
|
|
import type { FormProps, FormProviderSnippetProps } from './types';
|
|
|
|
let {
|
|
size = 'md',
|
|
layout = 'stack',
|
|
variant = 'plain',
|
|
children: bodyContent,
|
|
...rest
|
|
}: FormProps = $props();
|
|
|
|
const eidos = ActiveEidos.require();
|
|
const resolvedSize = $derived(eidos.resolve(size, 'md'));
|
|
</script>
|
|
|
|
<Form.Provider {...rest} data-size={resolvedSize} data-layout={layout} data-variant={variant}>
|
|
{#snippet children(snippetProps: FormProviderSnippetProps)}
|
|
{@render bodyContent?.(snippetProps)}
|
|
{/snippet}
|
|
</Form.Provider>
|