From c065ce35aa6044bb8c04f85891cf852635d1d26d Mon Sep 17 00:00:00 2001 From: Ricky Nguyen <105029551+nguyricky@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:51:48 -0700 Subject: [PATCH] Added Button shape for Sidebar --- index.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d9e987d..3de71ef 100644 --- a/index.js +++ b/index.js @@ -604,6 +604,20 @@ window.Triangle = function() { return div } +window.Button = function(content = "") { + let div = document.createElement("div"); + div.innerHTML = content; + div.style.color = "white"; + div.style.textAlign = "center"; + div.style.display = "flex"; + div.style.alignItems = "center"; + div.style.justifyContent = "center"; + div.style.cursor = "pointer"; + + Registry.render(div); + return div; +} + /* PROTOTYPE FUNCTIONS */ Array.prototype.last = function() { @@ -984,4 +998,4 @@ window.rendering = [] // } // } // } -// } \ No newline at end of file +// }