Replies: 1 comment
-
drop the usage of a variable and expose the widget itself const fn1 = ({props}) => {
const content = Widget.Stack({...props, children: {}})
const box = Widget.Box({child: content})
return Object.assign(box, {content})
}
const newWidget = fn1({prop: {transition: "crossfade"}})
newWidget.content.transition = "none" or you can access children widgets directly const fn2 = ({props}) => {
const content = Widget.Stack({...props, children: {}})
return Widget.Box({child: content})
}
const newWidget = fn2({prop: {transition: "crossfade"}})
newWidget.children[0].transition = "none" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's say I've a setup like this,
How can I bind to
_properties
and spreadvalues
in theStack
widget? I'm trying to create a custom widgetnewWidget
and I want to controlStack
widget's property usingnewWidget
later in my script (i.e.newWidget._properties.value = {transition: "slide_right"}
).Beta Was this translation helpful? Give feedback.
All reactions