Currently, I am utilizing JavaScript to dynamically create paper-buttons
in the following manner:
function createButtons(dieDefaults) {
for(var i = 0; i < dieDefaults.length; i++) {
var btn = document.createElement("paper-button");
var txt = document.createTextNode(dieDefaults[i]);
btn.className += "smallButton";
btn.onclick = function() {
document.getElementById("sidesInput").value = this.firstChild.nodeValue;
checkInput(btn);
}
btn.appendChild(txt);
document.getElementById("dieDefaultDiv").appendChild(btn);
}
}
When I create a paper-button using
var btn = document.createElement("paper-button");
, I am unsure how to include noink
or raised
. I am open to using CSS for styling, however, including --paper-button-raised: true;
within:
paper-button{
color: var(--paper-blue-grey-100);
background: var(--paper-indigo-500);
--paper-button-raised: true;}
has not been effective. Any suggestions on how to address this?