Problem/Motivation
Since UI Patterns 2.0.0-beta5 (Thursday 28 November) and #3449653: [2.0.0-beta5] Replace component() function by native include() function, we are promoting the use of Twig include function: https://twig.symfony.com/doc/3.x/functions/include.html
In UI Patterns 2.0.0-rc1, we will remove our custom component() function.
Proposed resolution
Replace all usages of:
{{ component('my-theme:my_component', {
my_slot_1: content,
my_slot_2: "Lorem ipsum",
}, {
my_prop_1: foo,
my_prop_2: true,
}) }}
By:
{{ include('my-theme:my_component', {
my_prop_1: foo,
my_prop_2: true,
my_slot_1: content,
my_slot_2: "Lorem ipsum",
}, with_context = false) }}
2 main differences:
- props and slots are in a single parameter
with_context = falseis necessary to avoid unexpected variables in the component template
Issue fork ui_suite_daisyui-3489965
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
niharika.s commentedComment #3
g4mbiniComment #4
g4mbiniComment #5
g4mbiniComment #8
g4mbini