mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-29 01:48:28 +00:00
web/DialogHolder: fix typescript error, add a note
This commit is contained in:
parent
26eaac5742
commit
b8eb708748
@ -8,16 +8,18 @@
|
|||||||
$: backdropVisible = $dialogs.length > 0;
|
$: backdropVisible = $dialogs.length > 0;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
this is the cleanest way of passing props without typescript throwing a fit.
|
||||||
|
more info here: https://github.com/microsoft/TypeScript/issues/46680
|
||||||
|
-->
|
||||||
<div id="dialog-holder">
|
<div id="dialog-holder">
|
||||||
{#each $dialogs as dialog}
|
{#each $dialogs as dialog}
|
||||||
{@const { type, ...data } = dialog}
|
{#if dialog.type === "small"}
|
||||||
|
<SmallDialog {...dialog} />
|
||||||
{#if type === "small"}
|
{:else if dialog.type === "picker"}
|
||||||
<SmallDialog {...data} />
|
<PickerDialog {...dialog} />
|
||||||
{:else if type === "picker"}
|
{:else if dialog.type === "saving"}
|
||||||
<PickerDialog {...data} />
|
<SavingDialog {...dialog} />
|
||||||
{:else if type === "saving"}
|
|
||||||
<SavingDialog {...data} />
|
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
<div id="dialog-backdrop" class:visible={backdropVisible}></div>
|
<div id="dialog-backdrop" class:visible={backdropVisible}></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user