Added static css styling for templates via a styles property.

This commit is contained in:
2020-08-11 13:45:54 -07:00
parent 1d13c50711
commit 057960db8a
3 changed files with 28 additions and 1 deletions

View File

@ -18,6 +18,15 @@ class Sheet extends IgniteElement {
};
}
get styles() {
return `
.sheet {
background-color: green;
color: #fff;
}
`;
}
render() {
return this.template
.class(this.show)
@ -34,7 +43,7 @@ class Sheet extends IgniteElement {
new a("I go nowhere, but you can click me ;)")
.on("click", this.linkClick).on("click", this.linkClick2)
.style("color", this.color, "important")
)
).class("sheet")
);
}