Files
Unify/application/demo/page/news.page.backButton.js
2025-12-25 11:16:59 +01:00

77 lines
818 B
JavaScript

import icon from "/elements/icon.js";
export default class backButton{
text = "<"
color = "white"
fontWeight = "bold"
cursor = "pointer";
propegateEvent = false
transition = "2s";
margin = 10;
marginLeft = 20;
fontFamily = "unset"
#ifdef WINDOWS
#ifdef DARK
#endif
#ifdef LIGHT
#endif
#endif
#ifdef MACOS
#ifdef DARK
boxBackground = "#282828";
#endif
#ifdef LIGHT
boxBackground = "#ffffff";
#endif
#endif
click() {
this.stateMachine.composeState( "Home" );
this.openNewsItems();
}
state openNewsItems() {
var rightSide = this.parents("newsPages");
//rightSide.newsItemPage.marginLeft = "0";
rightSide.newsItemPage.transform = "translateX(0)";
rightSide.newsPage.transform = "translateX(0)";
}
}