aotds-docks/src/lib/components/ShipEdit/Structure/Streamlining.svelte

42 lines
852 B
Svelte
Raw Normal View History

2022-03-04 21:31:05 +00:00
<ShipItem {...reqs}>
<Field label="streamlining">
<div>
<label>
<input type="radio" bind:group={type} value="none" />
none</label
>
<label>
<input type="radio" bind:group={type} value="partial" />
partial</label
>
<label>
<input type="radio" bind:group={type} value="full" />
full</label
>
</div>
</Field>
</ShipItem>
<script>
import ShipItem from "$lib/components/ShipItem/index.svelte";
import Field from "$lib/components/Field/index.svelte";
import { getContext } from "svelte";
export let type = "none";
export let reqs = {};
export let {dispatch, shipMass} = getContext("ship");
$: dispatch.setStreamlining({type, shipMass: $shipMass});
</script>
<style>
div {
display: flex;
}
label {
margin-left: 1em;
}
</style>