27 lines
679 B
Svelte
27 lines
679 B
Svelte
<script lang="ts">
|
|
|
|
import type FileViewState from "../models/FileViewState.svelte";
|
|
import StreamEditor from "./StreamEditor.svelte";
|
|
import type {StreamData} from "../models/StreamData";
|
|
|
|
let {fState, editorHeight}: { fState: FileViewState, editorHeight: number } = $props()
|
|
let streamData: StreamData = $derived(fState.container_prim?.stream_data ?);
|
|
|
|
|
|
</script>
|
|
{#if streamData.type === "Image"}
|
|
<div class="w-full m-auto">
|
|
<img alt="x-object" src={streamData.data}/>
|
|
</div>
|
|
{:else}
|
|
<StreamEditor
|
|
stream_data={streamData.data}
|
|
height={editorHeight}
|
|
></StreamEditor>
|
|
|
|
{/if}
|
|
|
|
<style lang="postcss">
|
|
|
|
|
|
</style> |