<script>
  let {
    username = $bindable(),
    password = $bindable(),
    legend = 'sign in',
    disabled,
    onsubmit
  } = $props();
</script>

<div>
  <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>
