Use iconNode instead of pseudoclass for icon

This commit is contained in:
Penar Musaraj 2018-11-07 12:56:54 -05:00
parent c24dfc5a95
commit 7bd941a479
2 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import { createWidget } from "discourse/widgets/widget";
import { iconNode } from "discourse-common/lib/icon-library";
export default createWidget("remove-vote", {
tagName: "div.remove-vote",
@ -8,7 +9,7 @@ export default createWidget("remove-vote", {
},
html() {
return ["Remove vote"];
return [iconNode("times"), "Remove vote"];
},
click() {

View File

@ -35,9 +35,7 @@
background-color: $primary-low;
}
}
.vote-option.remove-vote:before {
content: $fa-var-close;
font-family: FontAwesome;
.vote-option.remove-vote .d-icon {
margin-right: 6px;
color: $danger;
}