deploy: 36c5e658c4
This commit is contained in:
@@ -2,5 +2,14 @@
|
||||
This module provides reactive functionality for elements, it adds no new functionality for elements.
|
||||
It is used to evaluate expressions in property values and update the element when the expression changes.
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
local button = main:addButton({text="Exit"})
|
||||
button:setX("{parent.x - 12}")
|
||||
button:setBackground("{self.clicked and colors.red or colors.green}")
|
||||
button:setWidth("{self.text:len() + 2}")
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user