mmaillot
10/17/2017, 11:45 AMkonsoletyper
10/17/2017, 11:45 AMmmaillot
10/17/2017, 11:49 AMkonsoletyper
10/17/2017, 11:54 AMkonsoletyper
10/17/2017, 11:54 AMmmaillot
10/17/2017, 12:04 PMlewik
10/17/2017, 12:44 PMkarelpeeters
10/17/2017, 12:59 PMmmaillot
10/17/2017, 2:06 PMkarelpeeters
10/17/2017, 2:43 PMmmaillot
10/17/2017, 3:02 PMsnrostov
10/17/2017, 8:09 PMclass MyPage(key: String) : PureWidget(key) {
override fun render() = Column {
+Text(
text = "Page title",
style = TextStyle(
fontSize = 24.0,
fontWeight = bold
)
)
+Container(margin = Insets(leftRight = 10.0)) {
+Row {
+Container(padding = 10.allSides) {
+Column {
+BulletList {
+MenuItem("1", "About")
+MenuItem("2", "Documentation")
}
}
}
}
}
}
}
class MenuItem(
key: String,
val title: String
) : PureWidget(key) {
override fun render() = ListItem {
+Text(color = 0xFF0000.rgbColor) {
+MouseListener(click = ::click) {
+title
}
}
}
private fun click(mouseEvent: MouseEvent) {
}
}
The main difference is that the components are defined with immutable properties. Effectively Widgets is React.Props. If you are interested with that I can push it to github and write some docs.bashor
10/23/2017, 9:07 PMsnrostov
10/24/2017, 7:41 PMsnrostov
10/29/2017, 2:51 PM