module.exports = new Class ({ Extends: Vn.Component ,Tag: 'htk-icon' ,Properties: { icon: { 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 () { var node = this.createRoot ('img'); node.className = 'htk-icon'; } ,_setIcon: function () { var theme = this._theme ? this._theme : 'light'; this.node.src = 'image/icon/'+ theme +'/'+ this._icon +'.svg'; } });