2019-07-13 21:35:57 +12:00
|
|
|
<script>
|
|
|
|
import {join} from "lodash/fp";
|
|
|
|
|
|
|
|
export let values;
|
|
|
|
export let label;
|
|
|
|
|
|
|
|
const inputChanged = ev => {
|
|
|
|
try {
|
|
|
|
values = ev.target.value.split("\n");
|
|
|
|
} catch(_) {
|
|
|
|
values = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$: valuesText = join("\n")(values);
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2019-08-07 20:03:49 +12:00
|
|
|
|
|
|
|
<div class="uk-margin">
|
|
|
|
<label class="uk-form-label">{label}</label>
|
|
|
|
<div class="uk-form-controls">
|
|
|
|
<textarea value={valuesText} on:change={inputChanged} ></textarea>
|
|
|
|
</div>
|
2019-07-13 21:35:57 +12:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
width:300px;
|
|
|
|
height:200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|