Open History to see the last commit
1<!-- Take "form" as an prop, pass it to context, and render children -->
2<script lang="ts">
3 import { setContext, type Snippet } from 'svelte'
4 import { formContextKey } from './context-keys.js'
5β
6 interface Props {
7 form: any
8 children: Snippet
9 }
10β
11 const { children, form }: Props = $props()
12β
13 setContext(formContextKey, form)
14</script>
15β
16{@render children?.()}