added basic composite pattern to load the ui dynamically via json

This commit is contained in:
Samuel Andert
2023-07-22 09:12:03 +02:00
parent 081d052443
commit 01c742e6ce
5 changed files with 145 additions and 28 deletions

View File

@ -8,12 +8,30 @@
import GoogleAuth from '$lib/components/GoogleAuth.svelte';
import Messages from '$lib/components/Messages.svelte';
import MessageInput from '$lib/components/MessageInput.svelte';
import Composite from '$lib/components/Composite.svelte';
let componentsData = [
{
id: 2,
componentName: 'Composite',
name: 'Nested Composite 1',
components: [
{
id: 3,
componentName: 'LitStatus',
name: 'Leaf 2'
}
]
}
];
let pkpWallet;
let authSig;
let pkpPubKey =
'046da3ba67065fd1e2726242ca01cd4601524893f4aa4b0042578fa6cbec28fa8c9a28eb9f7893932fc09717edc9e1db57e157a21eed346247c1db5a722a01f571';
</script>
<Composite {componentsData} name="Main Composite" />
<!-- <LitStatus />
<AuthSign /> -->
@ -25,7 +43,7 @@
<WalletConnect bind:pkpWallet bind:authSig bind:pkpPubKey />
</div> -->
<div class="fixed top-0 left-0 w-full h-full overflow-hidden">
<!-- <div class="fixed top-0 left-0 w-full h-full overflow-hidden">
<main class="grid grid-rows-[auto,1fr,auto] min-h-screen">
<header class="bg-gray-100 text-black p-4">
<GoogleAuth />
@ -39,4 +57,4 @@
<MessageInput />
</footer>
</main>
</div>
</div> -->