ux icon indicating copy to clipboard operation
ux copied to clipboard

[TwigComponent] support passing data to `component()` variadically

Open kbond opened this issue 3 years ago • 1 comments

This would remove an array level from the component function:

{{ component('my_component', { prop1: 1, prop2: 2 }) }}

{# could be shortened to: #}

{{ component('my_component', prop1: 1, prop2: 2) }}

Can this be done in a BC way?

kbond avatar Jan 14 '22 18:01 kbond

I discovered this currently can't work as twig snake-cases variadic properties. For {{ component('my_component', prop1: 1, prop2: 2) }}, prop1 and prop2 are received as prop_1 and prop_2.

kbond avatar Jan 24 '22 16:01 kbond

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Apr 26 '24 12:04 carsonbot