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