You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
front/src/app/components/confirm-modal/confirm-modal.component.html

72 lines
2.3 KiB

<div id="confirm-modal-{{pinId}}">
<!-- Fond assombri -->
<div
class="fixed inset-0 bg-gray-900 bg-opacity-50 w-full h-full z-40 transition-opacity duration-300 ease-in-out"
[ngClass]="{
'opacity-0 pointer-events-none': !isOpen,
'opacity-100': isOpen
}"
(click)="cancel()"
></div>
<!-- Contenu principal -->
<div
class="fixed inset-0 z-50 flex justify-center items-center w-full h-full overflow-y-auto"
[ngClass]="{
'opacity-0 scale-50 pointer-events-none': !isOpen,
'opacity-100 scale-100': isOpen
}"
>
<div
class="bg-white dark:bg-gray-700 rounded-lg shadow p-6 w-full max-w-md transition-transform duration-300 ease-in-out my-8"
>
<!-- Modal header -->
<div
class="flex items-center justify-between border-b rounded-t dark:border-gray-600 mb-6 pb-2"
>
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">
Confirmation
</h2>
<button
type="button"
(click)="closeModal()"
class="end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
>
<svg
class="w-3 h-3"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 14 14"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
/>
</svg>
<span class="sr-only">Fermer la modal</span>
</button>
</div>
<p class="text-sm text-gray-700 dark:text-gray-300 mb-6">{{ message }}</p>
<div class="flex justify-end space-x-4">
<button
class="px-4 py-2 text-white bg-red-600 hover:bg-red-700 rounded"
(click)="confirm()"
>
Supprimer
</button>
<button
class="px-4 py-2 bg-gray-300 dark:bg-gray-600 text-gray-800 dark:text-white rounded hover:bg-gray-400 dark:hover:bg-gray-500"
(click)="cancel()"
>
Annuler
</button>
</div>
</div>
</div>
</div>