Commit 00cc34cc authored by kushalpandya's avatar kushalpandya Committed by Jarka Kadlecova

Add doc comment

parent 84c68bb1
......@@ -7,6 +7,19 @@ window.Flash = (function() {
return $(this).fadeOut();
};
/**
* Flash banner supports different types of Flash configurations
* along with ability to provide actionConfig which can be used to show
* additional action or link on banner next to message
*
* @param {String} message Flash message
* @param {String} type Type of Flash, it can be `notice` or `alert` (default)
* @param {Object} parent Reference to Parent element under which Flash needs to appear
* @param {Object} actionConfig Map of config to show action on banner
* @param {String} href URL to which action link should point (default '#')
* @param {String} title Title of action
* @param {Function} clickHandler Method to call when action is clicked on
*/
function Flash(message, type, parent, actionConfig) {
var flash, textDiv, actionLink;
if (type == null) {
......@@ -33,8 +46,8 @@ window.Flash = (function() {
if (actionConfig) {
actionLink = $('<a/>', {
"class": "flash-action",
"href": "#",
class: 'flash-action',
href: actionConfig.href || '#',
text: actionConfig.title
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment