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:
@ -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")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user