First commit
This commit is contained in:
74
application/elements/iconButton.js
Normal file
74
application/elements/iconButton.js
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user