blob: 6838a05bc29d12ef4662f89e23ad65f14a37cfc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<script lang="ts">
import { startShareConnection } from "../../network/channel/share_connection";
import data from "../../stores/data";
let value = "";
const submit = () => {
data.set(value);
startShareConnection();
};
// TODO: Accept data other than text.
</script>
<form on:submit|preventDefault={submit}>
<!-- TODO: Prettier input field -->
<input type="text" bind:value />
<input class="set-data-button" type="submit" value="Share" />
</form>
<style>
form {
display: flex;
flex-wrap: nowrap;
}
input {
border: none;
font-size: 14px;
color: black;
background-color: white;
padding: 10px 20px;
box-sizing: border-box;
}
.set-data-button {
margin-left: 0.5rem;
}
</style>
|