1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-21 06:48:04 +00:00

Dismiss buttons for database/collection modals

This commit is contained in:
2023-01-18 14:05:45 +01:00
parent 7d16261bff
commit 98608a6cc8
2 changed files with 23 additions and 2 deletions

View File

@ -74,8 +74,9 @@
<label class="field">
<input type="text" spellcheck="false" bind:value={newDb.name} use:input placeholder="New collection name" bind:this={newDbInput} />
</label>
<p>
<p class="modal-actions">
<button class="btn create" type="submit" disabled={!newDb.name?.trim()}>Create database</button>
<button class="btn secondary" type="button" on:click={() => newDb = undefined}>Cancel</button>
</p>
</form>
</Modal>
@ -89,9 +90,17 @@
<label class="field">
<input type="text" spellcheck="false" bind:value={newColl.name} use:input placeholder="New collection name" bind:this={newCollInput} />
</label>
<p>
<p class="modal-actions">
<button class="btn create" type="submit" disabled={!newColl.name?.trim()}>Create collection</button>
<button class="btn secondary" type="button" on:click={() => newColl = undefined}>Cancel</button>
</p>
</form>
</Modal>
{/if}
<style>
.modal-actions {
display: flex;
justify-content: space-between;
}
</style>