Open Strongleong opened 2 months ago
You can always do something like the following:
(defwidget exmaple_widget [start]
(box :halign {start == true ? "start" : "end"}
(children)
)
)
For an argument with 3 different possibilites you would have to compose a different code with a different datatype probably is a number the best performing.
For an argument with 3 different possibilites you would have to compose a different code with a different datatype probably is a number the best performing.
Sorry for unclear issue message. This three-way argument is just example. If I want to set another box
argument like valign
, I need to add yet another argument to my defwidget
. And this goes for every addition argument I want to pass through to underline box
Description of the requested feature
Lets say that I want to have default arguments to
box
widget. I would to something like this:The problem that if I want to add something to this box, it will not work:
halign
argument in this excample does not apply tobox
inside ofdefault_box
Proposed configuration syntax
I propose to add
[...name]
syntax to emphasize that widget accepts variable amount of arguments that can be refereed byname
. :...name` syntax for spreading array of arguments into argument list of another component, or probably to variable as key/value JSON listAdditional context
P.S. Sorry for bad English :sweat_smile: