File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,18 @@ prefix the attribute with ``:`` or use the normal ``{{ }}`` syntax:
295
295
// pass object, array, or anything you imagine
296
296
<twig:Alert : foo="['col' => ['foo', 'oof']]" />
297
297
298
+ Boolean props require using the dynamic syntax:
299
+
300
+ .. code-block :: html+twig
301
+
302
+ {# in this example, the 'false' value is passed as a string
303
+ (so it's converted automatically to the true boolean value) #}
304
+ <twig:Alert message="..." withCloseButton="false" />
305
+
306
+ {# in the following examples, the 'false' value is passed as a boolean property #}
307
+ <twig:Alert message="..." :withCloseButton="false" />
308
+ <twig:Alert message="..." withCloseButton="{{ false }}" />
309
+
298
310
Don't forget that you can mix and match props with attributes that you
299
311
want to render on the root element:
300
312
You can’t perform that action at this time.
0 commit comments