Added static css styling for templates via a styles property.
This commit is contained in:
11
src/sheet.js
11
src/sheet.js
@ -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")
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user