summaryrefslogtreecommitdiff
path: root/ui/lib/components/LogIn.svelte
blob: 5bfdae2f35857e195baf9146ce88e81a63ad2d4b (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
<script>
  let {
    username = $bindable(),
    password = $bindable(),
    legend = 'sign in',
    disabled,
    onsubmit
  } = $props();
</script>

<div>
  <form class="form" {onsubmit}>
    <label for="username">
      username
      <input name="username" type="text" placeholder="username" bind:value={username} {disabled} />
    </label>
    <label for="password">
      password
      <input
        name="password"
        type="password"
        placeholder="password"
        bind:value={password}
        {disabled}
      />
    </label>
    <button type="submit">
      {legend}
    </button>
  </form>
</div>