- ${bw.popup.addHeader(option.headerText, option.headerBg, option.headerTextColor, option.padding)}
-
- ${option.contentHtml}
-
- ${bw.popup.addButton(option.actionButtonText, option.actionButtonColor, option.padding, `bw-popup-btn-${i}`, option.action)}
+
+ let option = {
+ ...defaultOptions,
+ ...options
+ };
+ const size = PopUpSize[option.popupSize];
+
+ let temp_html = `
+
+
+ ${bw.popup.addHeader(option.header, option.headerBackgroundColor, option.headerColor, option.padding)}
+
+ ${option.content}
+
+ ${bw.popup.addButton(option.actionButtonText, option.buttonBackgroundColor, option.buttonTextColor, option.padding, `bw-popup-btn`, option.closeButtonAction, option.url)}
-
`
- overlay.insertAdjacentHTML('afterbegin', temp_html);
- }
+
+
`
+ overlay.insertAdjacentHTML('afterbegin', temp_html);
cb && cb();
},
addHeader: function(headerTitle, bgColor, textColor, padding){
- let headerHtml = `