migrate: convert most components to svelte 5
This commit is contained in:
1 parent
d670f39f0a
commit
10ef4123da
225 files changed
+5441
-3341
No files matched your search
@@ -1,16 +1,26 @@
|
||||
<script lang="ts">
|
||||
import { generateID } from '../forms/helper.js'
|
||||
|
||||
export let group: string = generateID()
|
||||
export let row: boolean = false
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
interface Props {
|
||||
group?: string;
|
||||
row?: boolean;
|
||||
class?: string;
|
||||
children?: import('svelte').Snippet<[any]>;
|
||||
}
|
||||
|
||||
let {
|
||||
group = generateID(),
|
||||
row = false,
|
||||
class: clazz = '',
|
||||
children
|
||||
}: Props = $props();
|
||||
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<div
|
||||
class="flex {row ? 'flex-row flex-wrap' : 'flex-col'} gap-4 {clazz || ''}"
|
||||
>
|
||||
<slot {group} />
|
||||
{@render children?.({ group, })}
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user