budibase/packages/standard-components/src/Test/TestApp.svelte

41 lines
549 B
Svelte
Raw Normal View History

2019-08-27 08:32:56 +02:00
<script>
import createApp from "./createApp";
import { props } from "./props";
let _bb;
const _appPromise = createApp();
_appPromise.then(a => _bb = a);
2020-01-18 10:00:18 +01:00
const testProps = props.divWithAFewControls;
let currentComponent;
$: {
if(_bb && currentComponent) {
2020-01-18 10:00:18 +01:00
_bb.hydrateChildren(testProps._children, currentComponent);
}
}
2019-08-27 08:32:56 +02:00
</script>
{#await _appPromise}
loading
{:then _bb}
2019-08-27 08:32:56 +02:00
<div id="current_component" bind:this={currentComponent}>
2019-08-27 08:32:56 +02:00
</div>
{/await}
2019-08-27 08:32:56 +02:00
<style>
#current_component {
2019-08-27 08:32:56 +02:00
height: 100%;
width: 100%;
}
</style>