We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b123a commit 6a41daeCopy full SHA for 6a41dae
dist/ultra.js
@@ -87,7 +87,7 @@ const Ultra = {
87
}, 10000);
88
},
89
90
- modal({ head = "Modal", text = "" }) {
+ modal({ head = "Modal", text = "", buttonText = "Close" } = {}) {
91
const modalOverlay = document.createElement("div");
92
modalOverlay.className = "ultra-modal-container";
93
Object.assign(modalOverlay.style, {
@@ -126,7 +126,7 @@ const Ultra = {
126
127
const closeBtn = document.createElement("button");
128
closeBtn.className = "ultra-modal-close ultra-button button-wave";
129
- closeBtn.textContent = "Close";
+ closeBtn.textContent = buttonText;
130
closeBtn.style.marginTop = "20px";
131
closeBtn.onclick = () => modalOverlay.remove();
132
0 commit comments