36 lines
857 B
Svelte
36 lines
857 B
Svelte
<script>
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
const selectedCoordinateTypeChange = (event) => {
|
|
dispatch('type-change', event.detail);
|
|
};
|
|
|
|
const change = (event) => {
|
|
dispatch('type-change', event.detail);
|
|
};
|
|
|
|
export let selectedCoordinateType;
|
|
export let coordinateTypes;
|
|
|
|
export let value;
|
|
</script>
|
|
|
|
<div class="mb-4">
|
|
<label class="text-gray-700 text-sm font-bold mb-2" for="username">
|
|
<select bind:value={selectedCoordinateType} on:change={selectedCoordinateTypeChange}>
|
|
{#each coordinateTypes as t}
|
|
<option value={t}>{t}</option>
|
|
{/each}
|
|
</select>
|
|
</label>
|
|
<input
|
|
class="shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-96"
|
|
type="text"
|
|
bind:value
|
|
placeholder="0.00"
|
|
on:change
|
|
/>
|
|
</div>
|