提交 ed7c8336 编写于 作者: J Johannes Rieken

update colors on every update

上级 f813a949
......@@ -152,15 +152,14 @@ export class IconLabel {
if (!this.badgeNode) {
this.badgeNode = document.createElement('span');
this.badgeNode.className = 'label-badge';
this.badgeNode.style.backgroundColor = options.color.toString();
// this.badgeNode.style.color = (options.color.isDarker() ? Color.white : Color.black).toString();
this.badgeNode.style.color = Color.white.toString();
this.element.style.display = 'flex';
this.element.appendChild(this.badgeNode);
}
const { letter, title } = options.badge;
this.badgeNode.innerHTML = letter;
this.badgeNode.title = title;
this.badgeNode.style.backgroundColor = options.color.toString();
this.badgeNode.style.color = Color.white.toString();
dom.show(this.badgeNode);
} else if (this.badgeNode) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册