weird problem with spreads?
This commit is contained in:
parent
d77d280bd5
commit
63f8f70a93
@ -10,12 +10,13 @@
|
||||
<JsonOutput />
|
||||
</div>
|
||||
<div class:hide={activeTab !== 'print'}>
|
||||
<PrintOutput />
|
||||
<PrintOutput ship={$state}/>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<script>
|
||||
import { getContext } from 'svelte';
|
||||
import { Modal, Card, Nav } from "svelte-chota";
|
||||
|
||||
import Ribbon from "./Ribbon.svelte";
|
||||
@ -27,6 +28,8 @@
|
||||
|
||||
let activeTab = 'editor';
|
||||
$: console.log(activeTab);
|
||||
|
||||
const {state} = getContext('ship');
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -3,11 +3,15 @@
|
||||
</h1>
|
||||
|
||||
<div class="details">
|
||||
<h2>{shipClass}-class, {shipType}</h2>
|
||||
<h2>
|
||||
{#if shipClass}
|
||||
{shipClass}-class,
|
||||
{/if}
|
||||
{shipType}</h2>
|
||||
<div class="reqs">
|
||||
<Cost cost={reqs.cost} />
|
||||
<Cost cost={cost} />
|
||||
|
||||
<Mass mass={reqs.mass} />
|
||||
<Mass mass={mass} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -17,7 +21,8 @@
|
||||
|
||||
export let shipClass;
|
||||
export let shipType;
|
||||
export let reqs = {};
|
||||
export let cost = 0;
|
||||
export let mass = 0;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<div class="print-output">
|
||||
<Identification
|
||||
{...ship.identification}
|
||||
reqs={ship.reqs}
|
||||
shipClass={ship.identification.shipClass}
|
||||
shipType={ship.identification.shipType}
|
||||
cost={ship.reqs?.cost}
|
||||
mass={ship.reqs?.mass}
|
||||
/>
|
||||
|
||||
<div class="section-2">
|
||||
|
Loading…
Reference in New Issue
Block a user