aotds-docks/src/lib/components/ShipEdit/index.svelte

47 lines
1.0 KiB
Svelte
Raw Normal View History

2022-03-15 14:59:33 +00:00
<main>
2023-04-22 14:37:49 +00:00
<div class="identification-row">
2022-03-15 14:59:33 +00:00
<Identification {...$shipState.identification} />
2022-03-02 16:14:31 +00:00
<ShipCost {...$shipState.reqs} />
2023-04-22 14:37:49 +00:00
</div>
2022-03-02 00:14:01 +00:00
2023-04-22 14:37:49 +00:00
<Propulsion propulsion={$shipState.propulsion} />
2022-03-02 18:42:42 +00:00
2023-04-22 14:37:49 +00:00
<Structure {...$shipState.structure} />
2022-03-04 00:45:47 +00:00
2023-04-22 14:37:49 +00:00
<Weaponry {...$shipState.weaponry} />
2022-03-14 14:53:36 +00:00
2023-04-22 14:37:49 +00:00
{#if $shipState.identification.isCarrier}
<Carrier {...$shipState.carrier} />
{/if}
</main>
2022-03-06 19:10:44 +00:00
2022-03-02 00:14:01 +00:00
<script>
2023-04-22 14:37:49 +00:00
import { getContext } from "svelte";
2022-03-02 00:14:01 +00:00
2023-04-22 14:37:49 +00:00
import Identification from "./Identification/index.svelte";
import ShipCost from "./ShipCost.svelte";
import Propulsion from "./Propulsion/index.svelte";
import Structure from "./Structure/index.svelte";
import Carrier from "./Carrier/index.svelte";
import Weaponry from "./Weaponry/index.svelte";
2022-03-02 00:14:01 +00:00
2023-04-22 14:37:49 +00:00
const { state: shipState } = getContext("ship");
2022-03-02 00:14:01 +00:00
</script>
<style>
2023-04-22 14:37:49 +00:00
.identification-row {
display: flex;
}
.identification-row :global(> *:first-child) {
flex: 1;
}
main {
width: var(--main-width);
margin-left: auto;
margin-right: auto;
}
2022-03-02 00:14:01 +00:00
</style>