1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-19 22:18:03 +00:00

Split app.svelte

This commit is contained in:
2023-01-16 20:03:56 +01:00
parent 89d9a92136
commit e0cda5cccb
12 changed files with 258 additions and 174 deletions

View File

@ -0,0 +1,36 @@
<script>
import CodeExample from '../../../components/code-example.svelte';
export let collection;
let remove = '';
$: code = `db.${collection.key}.remove(${remove});`;
function performRemove() {}
</script>
<form on:submit|preventDefault={performRemove}>
<CodeExample {code} />
<label class="field">
<textarea cols="30" rows="10" bind:value={remove} placeholder={'{}'} class="code"></textarea>
</label>
<div class="flex">
<div></div>
<button type="submit" class="btn" disabled={!remove}>Remove</button>
</div>
</form>
<style>
form {
display: grid;
grid-template-rows: auto 1fr auto;
gap: 0.5rem;
}
.flex {
display: flex;
justify-content: space-between;
}
</style>