Added dynamic styling to templates via a style function, with this properties can be used to create styles that automatically update. Or you can use static style values.

This commit is contained in:
MattMo committed 2020-08-11 12:53:57 -07:00
1 parent 4e53913331
commit 1d13c50711
2 files changed
+43 -8

No files matched your search

+4 -1
View File
@@ -12,6 +12,7 @@ class Sheet extends IgniteElement {
items: ["1", "2"],
href: "www.google.com",
name: "default content",
color: "red",
linkClick: this.onClick1,
linkClick2: this.onClick2
};
@@ -30,7 +31,9 @@ class Sheet extends IgniteElement {
new html("<h3>---- begin sheet's slot ----<h3>"),
new slot(this),
new html("<h3>---- end of slot ----</h3>"),
new a("I go nowhere, but you can click me ;)").on("click", this.linkClick).on("click", this.linkClick2)
new a("I go nowhere, but you can click me ;)")
.on("click", this.linkClick).on("click", this.linkClick2)
.style("color", this.color, "important")
)
);
}