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

35 lines
558 B
Svelte
Raw Normal View History

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