aotds-docks/src/components/Hull/Streamlining/index.svelte

41 lines
913 B
Svelte
Raw Normal View History

2020-07-26 22:22:05 +00:00
<ShipItem {cost} {mass}>
<Field label="streamlining">
<div>
2020-07-28 19:42:20 +00:00
<label>
2020-07-26 22:22:05 +00:00
<input type="radio" bind:group={type} value="none" />
2020-07-28 19:42:20 +00:00
none</label>
<label>
2020-07-26 22:22:05 +00:00
<input type="radio" bind:group={type} value="partial" />
2020-07-28 19:42:20 +00:00
partial</label>
<label>
2020-07-26 22:22:05 +00:00
<input type="radio" bind:group={type} value="full" />
2020-07-28 19:42:20 +00:00
full</label>
2020-07-26 22:22:05 +00:00
</div>
</Field>
</ShipItem>
<script>
2021-05-17 13:48:31 +00:00
import get from 'lodash/get.js';
import ShipItem from '$lib/components/ShipItem/index.svelte';
import Field from '$lib/components/Field/index.svelte';
import dux from '$lib/dux/streamlining';
2020-07-26 22:22:05 +00:00
import {getContext } from 'svelte';
export let type = 'none';
export let cost = 0;
export let mass = 0;
export let ship_change = getContext('ship_change') || ( () => {} );
$: ship_change( dux.actions.set_streamlining(type));
</script>
<style>
div { display: flex }
2020-07-28 19:42:20 +00:00
label {
margin-left: 1em;
}
2020-07-26 22:22:05 +00:00
</style>