summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/flash.js
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/flash.js
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/flash.js')
-rw-r--r--app/assets/javascripts/flash.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/flash.js b/app/assets/javascripts/flash.js
index 1d5f09a265b..d14af53746e 100644
--- a/app/assets/javascripts/flash.js
+++ b/app/assets/javascripts/flash.js
@@ -34,7 +34,7 @@ const hideFlash = (flashEl, fadeTransition = true) => {
if (!fadeTransition) flashEl.dispatchEvent(new Event('transitionend'));
};
-const createAction = config => `
+const createAction = (config) => `
<a
href="${config.href || '#'}"
class="flash-action"
@@ -69,7 +69,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
* @param {String} message Flash message text
* @param {String} type Type of Flash, it can be `notice`, `success`, `warning` or `alert` (default)
* @param {Object} parent Reference to parent element under which Flash needs to appear
- * @param {Object} actonConfig Map of config to show action on banner
+ * @param {Object} actionConfig Map of config to show action on banner
* @param {String} href URL to which action config should point to (default: '#')
* @param {String} title Title of action
* @param {Function} clickHandler Method to call when action is clicked on
@@ -97,7 +97,7 @@ const deprecatedCreateFlash = function deprecatedCreateFlash(
if (actionConfig.clickHandler) {
flashEl
.querySelector('.flash-action')
- .addEventListener('click', e => actionConfig.clickHandler(e));
+ .addEventListener('click', (e) => actionConfig.clickHandler(e));
}
}
@@ -119,7 +119,7 @@ const deprecatedCreateFlash = function deprecatedCreateFlash(
* @param {String} options.message Flash message text
* @param {String} options.type Type of Flash, it can be `notice`, `success`, `warning` or `alert` (default)
* @param {Object} options.parent Reference to parent element under which Flash needs to appear
- * @param {Object} options.actonConfig Map of config to show action on banner
+ * @param {Object} options.actionConfig Map of config to show action on banner
* @param {String} href URL to which action config should point to (default: '#')
* @param {String} title Title of action
* @param {Function} clickHandler Method to call when action is clicked on
@@ -151,7 +151,7 @@ const createFlash = function createFlash({
if (actionConfig.clickHandler) {
flashEl
.querySelector('.flash-action')
- .addEventListener('click', e => actionConfig.clickHandler(e));
+ .addEventListener('click', (e) => actionConfig.clickHandler(e));
}
}