Files
amcs/ui/src/components/shared/FormerShell.svelte
Hein 9e6d05e055
Some checks failed
CI / build-and-test (push) Failing after -31m24s
feat(ui): add content editor components for skills and thoughts
* Implement ContentEditorField for inline editing of content
* Create ContentEditorModal for editing content in a modal
* Introduce FormerShell for managing forms related to skills and thoughts
* Enhance SkillsPage and ThoughtsPage with new components for better content management
2026-05-02 19:35:27 +02:00

39 lines
835 B
Svelte

<script lang="ts">
import { FormerDrawer } from '@warkypublic/svelix';
import type { FormerProps, FormRequestType } from '@warkypublic/svelix';
import type { Snippet } from 'svelte';
interface Props extends FormerProps<any> {
title?: string;
width?: string;
children?: Snippet<[any]>;
}
let {
title = 'Form',
opened = $bindable(false),
values = $bindable<any>(undefined),
request = $bindable<FormRequestType>('insert'),
layout = { buttonArea: 'bottom' },
width = '36rem',
children: formContent,
...rest
}: Props = $props();
</script>
<FormerDrawer
bind:opened
bind:values
bind:request
{title}
{layout}
{width}
{...rest}
>
{#snippet children(state)}
<div class="space-y-4 p-6">
{@render formContent?.(state)}
</div>
{/snippet}
</FormerDrawer>