0
1
Fork 0
hedera-web-mindshore/js/htk/icon/index.js

52 lines
778 B
JavaScript

var Component = require('vn/component');
module.exports = new Class({
Extends: Component
,Tag: 'htk-icon'
,Properties:
{
name: {
type: String
,set: function(x) {
this._icon = x;
this._setIcon();
}
,get: function() {
return this._icon;
}
},
theme: {
type: String
,set: function(x) {
this._theme = x;
this._setIcon();
}
,get: function() {
return this._theme;
}
},
alt: {
type: String
,set: function(x) {
this.node.alt = x;
}
,get: function() {
return this.node.alt;
}
}
}
,_icon: null
,render: function() {
const node = this.createRoot('span');
node.className = 'htk-icon material-symbols-rounded';
}
,_setIcon: function() {
this.node.innerText = this._icon;
}
});