diff options
Diffstat (limited to 'app/assets/javascripts/flash.js')
-rw-r--r-- | app/assets/javascripts/flash.js | 10 |
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)); } } |