@ordersune/crm-web-sdk 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web-sdk.js +18 -16
- package/package.json +1 -1
package/dist/web-sdk.js
CHANGED
|
@@ -569,22 +569,24 @@ class WebSDK {
|
|
|
569
569
|
}
|
|
570
570
|
else {
|
|
571
571
|
// Single button
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
572
|
+
if (primaryButtonText && primaryButtonText.trim() !== '') {
|
|
573
|
+
const primaryButton = document.createElement('button');
|
|
574
|
+
primaryButton.textContent = primaryButtonText;
|
|
575
|
+
primaryButton.style.width = '100%';
|
|
576
|
+
primaryButton.style.padding = '12px';
|
|
577
|
+
primaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesPrimary.backgroundColor);
|
|
578
|
+
primaryButton.style.color = this.hexToColor(buttonPropertiesPrimary.textColor);
|
|
579
|
+
primaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesPrimary.borderColor)}`;
|
|
580
|
+
primaryButton.style.borderRadius = '8px';
|
|
581
|
+
primaryButton.style.fontSize = '16px';
|
|
582
|
+
primaryButton.style.fontWeight = '600';
|
|
583
|
+
primaryButton.style.cursor = 'pointer';
|
|
584
|
+
primaryButton.onclick = () => {
|
|
585
|
+
document.body.removeChild(modalOverlay);
|
|
586
|
+
onPrimaryButtonPress();
|
|
587
|
+
};
|
|
588
|
+
buttonsContainer.appendChild(primaryButton);
|
|
589
|
+
}
|
|
588
590
|
}
|
|
589
591
|
// Add all elements to the modal
|
|
590
592
|
modalDialog.appendChild(closeButton);
|