PHP Classes

File: resources/js/modal.js

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   resources/js/modal.js   Download  
File: resources/js/modal.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 462 bytes
 

 

Contents

Class file image Download
import { bootstrapComponent } from './bootstrap-global.js'; // Bootstrap handles opening, focus trapping, Escape and restoring focus; this only adds // "open on load" (e.g. to show a form again with its server errors). export function initModal(element, options) { const Modal = bootstrapComponent('Modal'); if (!Modal) { return null; } const modal = Modal.getOrCreateInstance(element); if (options.open) { modal.show(); } return modal; }