Mentions légales du service

Skip to content
Snippets Groups Projects

Resolve "Adding validation modal on delete page & component"

Merged VIAUD Nathan requested to merge 180-adding-validation-modal-on-delete-page-component into main
6 files
+ 113
6
Compare changes
  • Side-by-side
  • Inline
Files
6
+ 68
0
<script setup lang='ts'>
import { useEditorStore } from '../shared/stores';
const editorStore = useEditorStore();
</script>
<template>
<div class="modal-backdrop">
<div class="modal">
<h3>Souhaitez-vous vraiment supprimer cet élément ?</h3>
<button class="btn btn-close" @click="editorStore.validationModal = false"><i class="icon-x"></i></button>
<button class="btn-choice accept" @click="editorStore.deleteSelectedNodes">OUI, SUPPRIMER</button>
<button class="btn-choice cancel" @click="editorStore.validationModal = false">NON, NE PAS SUPPRIMER</button>
</div>
</div>
</template>
<style lang="scss" scoped>
.modal-backdrop {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
}
.modal {
position: relative;
padding: 2rem;
background-color: white;
display: flex;
flex-direction: column;
border-radius: 10px;
gap: 1rem;
width: 22rem;
}
h3 {
text-align: center;
}
.btn-choice {
cursor: pointer;
border: none;
border-radius: 30px;
font-size: 1rem;
font-weight: 500;
padding: 1rem;
&:hover {
filter: brightness(95%);
}
&.cancel {
background-color: #fff;
color: var(--inria-grey);
border: 1px solid var(--inria-grey);
}
&.accept {
background-color: #E93100;
color: #fff;
}
}
</style>
\ No newline at end of file
Loading