2022-03-04 00:45:47 +00:00
|
|
|
<ShipItem {...reqs}>
|
|
|
|
<Field label="hull">
|
2022-03-20 18:42:59 +00:00
|
|
|
<input class="short" bind:value={rating} type="number" {min} {max} />
|
2022-03-04 00:45:47 +00:00
|
|
|
</Field>
|
|
|
|
</ShipItem>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { getContext } from "svelte";
|
|
|
|
|
|
|
|
import ShipItem from '$lib/components/ShipItem/index.svelte';
|
|
|
|
import Field from '$lib/components/Field/index.svelte';
|
|
|
|
|
|
|
|
export let rating = 0;
|
|
|
|
export let reqs = {};
|
|
|
|
export let min = 0;
|
|
|
|
export let max = 1;
|
|
|
|
|
|
|
|
const ship = getContext('ship');
|
|
|
|
|
|
|
|
$: ship.dispatch.setHull(rating);
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
input {
|
|
|
|
width: 5em;
|
|
|
|
}
|
|
|
|
</style>
|