Add fullscreen mode for modal
This commit is contained in:
parent
8260c6c5da
commit
0e44a01218
@ -195,7 +195,7 @@ export async function registerAllListeners() {
|
||||
`,
|
||||
confirmText: 'Ajouter un service',
|
||||
cancelText: 'Annuler'
|
||||
});
|
||||
}, true);
|
||||
|
||||
try {
|
||||
if (!result) {
|
||||
|
@ -171,13 +171,13 @@ export default class ModalService {
|
||||
if (this.modal) this.modal.style.display = 'none';
|
||||
}
|
||||
|
||||
async showConfirmationModal(options: ConfirmationModalOptions): Promise<boolean> {
|
||||
async showConfirmationModal(options: ConfirmationModalOptions, fullscreen: boolean = false): Promise<boolean> {
|
||||
// Create modal element
|
||||
const modalElement = document.createElement('div');
|
||||
modalElement.id = 'confirmation-modal';
|
||||
modalElement.innerHTML = `
|
||||
<div class="modal-overlay">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content" ${fullscreen ? 'style="width: width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important;"' : ''}>
|
||||
<h2>${options.title}</h2>
|
||||
<div class="modal-body">
|
||||
${options.content}
|
||||
|
Loading…
x
Reference in New Issue
Block a user