aboutsummaryrefslogtreecommitdiff
path: root/js/src/util/backdrop.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-07-29 09:14:40 +0300
committerGitHub <[email protected]>2021-07-29 09:14:40 +0300
commitef5336373fc2431b3d1d37cde85cd262210a1dc6 (patch)
treee325fb4c5532b464d05780c731d0f118f2a88d7f /js/src/util/backdrop.js
parent62edf07d7491684fe67a9c1e9439ed2bd10ca741 (diff)
parentc6c0bbb0b67fe89b55740a63fd10d4ad79044970 (diff)
downloadbootstrap-main-fod-simpler-table-structure.tar.xz
bootstrap-main-fod-simpler-table-structure.zip
Merge branch 'main' into main-fod-simpler-table-structuremain-fod-simpler-table-structure
Diffstat (limited to 'js/src/util/backdrop.js')
-rw-r--r--js/src/util/backdrop.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js
index 028325d11..fbe32445e 100644
--- a/js/src/util/backdrop.js
+++ b/js/src/util/backdrop.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.0.1): util/backdrop.js
+ * Bootstrap (v5.0.2): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,6 +9,7 @@ import EventHandler from '../dom/event-handler'
import { execute, executeAfterTransition, getElement, reflow, typeCheckConfig } from './index'
const Default = {
+ className: 'modal-backdrop',
isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false,
rootElement: 'body', // give the choice to place backdrop under different elements
@@ -16,13 +17,13 @@ const Default = {
}
const DefaultType = {
+ className: 'string',
isVisible: 'boolean',
isAnimated: 'boolean',
rootElement: '(element|string)',
clickCallback: '(function|null)'
}
const NAME = 'backdrop'
-const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
@@ -73,7 +74,7 @@ class Backdrop {
_getElement() {
if (!this._element) {
const backdrop = document.createElement('div')
- backdrop.className = CLASS_NAME_BACKDROP
+ backdrop.className = this._config.className
if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE)
}