update: buttons in [id].vue

main
TZGyn 3 years ago
parent 2a2520dbec
commit 261195f4ed

@ -1,35 +1,37 @@
<template> <template>
<App class="p-4"> <App class="p-4">
<ClientOnly>
<ElementTextArea <ElementTextArea
@keydown.ctrl.s.prevent="submit(note)" @keydown.ctrl.s.prevent="submit(note)"
v-model="note.title" v-model="note.title"
placeholder="untitled" placeholder="untitled"
rows="1" rows="1"
class="text-center" /> class="text-center" />
<div class="menu"> <div class="flex w-full max-w-2xl justify-end gap-4">
<button @click="submit(note)"> <ElementButton
class="hover:bg-blue-500 hover:text-black"
@click="submit(note)">
<Icon <Icon
v-if="isSubmitting" v-if="isSubmitting"
name="loading" /> name="loading" />
<Icon <Icon
v-if="!isSubmitting" v-if="!isSubmitting"
name="fa6-solid:floppy-disk" /> name="fa6-solid:floppy-disk" />
</button> </ElementButton>
<button @click="deleteNote"> <ElementButton
class="hover:bg-red-500 hover:text-black"
@click="deleteNote">
<Icon <Icon
v-if="isDeleting" v-if="isDeleting"
name="loading" /> name="loading" />
<Icon <Icon
v-if="!isDeleting" v-if="!isDeleting"
name="fa6-solid:trash" /> name="fa6-solid:trash" />
</button> </ElementButton>
</div> </div>
<ElementTextArea <ElementTextArea
@keydown.ctrl.s.prevent="submit(note)" @keydown.ctrl.s.prevent="submit(note)"
v-model:model-value="note.description" v-model:model-value="note.description"
class="h-full p-4" /> class="h-full p-4" />
</ClientOnly>
</App> </App>
</template> </template>

Loading…
Cancel
Save