2016-09-26 09:28:47 +00:00
|
|
|
|
2022-06-06 12:49:18 +00:00
|
|
|
var Component = require('vn/component');
|
2016-09-26 09:28:47 +00:00
|
|
|
|
2022-05-21 21:31:56 +00:00
|
|
|
module.exports = new Class({
|
2022-06-06 12:49:18 +00:00
|
|
|
Extends: Component
|
2016-09-26 09:28:47 +00:00
|
|
|
,Tag: 'htk-icon'
|
|
|
|
,Properties:
|
|
|
|
{
|
2022-05-21 21:31:56 +00:00
|
|
|
name: {
|
2016-09-26 09:28:47 +00:00
|
|
|
type: String
|
2022-05-21 21:31:56 +00:00
|
|
|
,set: function(x) {
|
2016-09-26 09:28:47 +00:00
|
|
|
this._icon = x;
|
2022-05-21 21:31:56 +00:00
|
|
|
this._setIcon();
|
2016-09-26 09:28:47 +00:00
|
|
|
}
|
2022-05-21 21:31:56 +00:00
|
|
|
,get: function() {
|
2016-09-26 09:28:47 +00:00
|
|
|
return this._icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
2022-05-21 21:31:56 +00:00
|
|
|
theme: {
|
2016-09-26 09:28:47 +00:00
|
|
|
type: String
|
2022-05-21 21:31:56 +00:00
|
|
|
,set: function(x) {
|
2016-09-26 09:28:47 +00:00
|
|
|
this._theme = x;
|
2022-05-21 21:31:56 +00:00
|
|
|
this._setIcon();
|
2016-09-26 09:28:47 +00:00
|
|
|
}
|
2022-05-21 21:31:56 +00:00
|
|
|
,get: function() {
|
2016-09-26 09:28:47 +00:00
|
|
|
return this._theme;
|
|
|
|
}
|
|
|
|
},
|
2022-05-21 21:31:56 +00:00
|
|
|
alt: {
|
2016-09-26 09:28:47 +00:00
|
|
|
type: String
|
2022-05-21 21:31:56 +00:00
|
|
|
,set: function(x) {
|
2016-09-26 09:28:47 +00:00
|
|
|
this.node.alt = x;
|
|
|
|
}
|
2022-05-21 21:31:56 +00:00
|
|
|
,get: function() {
|
2016-09-26 09:28:47 +00:00
|
|
|
return this.node.alt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,_icon: null
|
|
|
|
|
2022-05-21 21:31:56 +00:00
|
|
|
,render: function() {
|
|
|
|
const node = this.createRoot('span');
|
2022-06-06 17:13:57 +00:00
|
|
|
node.classList.add('material-symbols-rounded');
|
2016-09-26 09:28:47 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 21:31:56 +00:00
|
|
|
,_setIcon: function() {
|
|
|
|
this.node.innerText = this._icon;
|
2016-09-26 09:28:47 +00:00
|
|
|
}
|
|
|
|
});
|