1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-04-20 01:01:03 +00:00

37 lines
729 B
Svelte
Raw Normal View History

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