@@ -20,6 +20,7 @@ export function TestUi1Component() {
|
||||
Component.useSignal(buttonRef, "pressed", () => {
|
||||
console.log("Pressed!")
|
||||
})
|
||||
const [buttonPressed] = Component.useSignalValues(buttonRef, "toggled", () => [false] as const)
|
||||
|
||||
|
||||
return (
|
||||
@@ -28,7 +29,7 @@ export function TestUi1Component() {
|
||||
>
|
||||
<Label
|
||||
name="Label"
|
||||
text="This is a label"
|
||||
text={buttonPressed ? "The button is pressed" : "The button is not pressed"}
|
||||
/>
|
||||
|
||||
<TextEdit
|
||||
@@ -41,6 +42,7 @@ export function TestUi1Component() {
|
||||
<Button
|
||||
ref={buttonRef}
|
||||
name="Button"
|
||||
toggle_mode
|
||||
text="Ok"
|
||||
/>
|
||||
</VFlowContainer>
|
||||
|
||||
Reference in New Issue
Block a user