<script>
    export let disabled = false;
    export let username = '';
    export let password = '';
    export let legend = 'sign in';
</script>

<div class="card m-4 p-4">
    <form on:submit|preventDefault>
        <label class="label" for="username">
            username
            <input class="input" name="username" type="text" placeholder="username" bind:value={username} disabled={disabled}>
        </label>
        <label class="label" for="password">
            password
            <input class="input" name="password" type="password" placeholder="password" bind:value={password} disabled={disabled}>
        </label>
        <button class="btn variant-filled" type="submit">
            {legend}
        </button>
    </form>
</div>
