Files
Unify/application/elements/iconButton.js

75 lines
996 B
JavaScript
Raw Normal View History

2025-12-25 11:16:59 +01:00
import label from './label.js';
import icon from './icon.js';
class customLabel extends label{
color = "black";
constructor( text, color ) {
super();
if( color ) {
this.color = color;
}
this.text = text;
this.value = text;
}
setActive() {
//this.fontWeight = "bold";
//this.textShadow = "#dfdfdf 1px 0px 5px";
}
setInactive() {
//this.fontFamily = "TT Norms Pro Regular";
//this.color = "#bdbdbd";
//this.fontWeight = "normal";
//this.textShadow = "none";
}
create() {
//this.fontFamily = "TT Norms Pro Regular";
}
click() {
console.log("click label");
//this.setActive();
}
fontSize = "14px";
editable = false;
}
export default class iconButton{
constructor( text, iconName, mirror = true, color ) {
this.label = new customLabel( text, color );
this._icon = new icon( iconName, mirror );
}
}