Skip to content

Commit dcfcbd7

Browse files
JeanDavidDavietkbond
authored andcommitted
Fix typo on only and without methods documentation
1 parent 2562a6c commit dcfcbd7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/TwigComponent/doc/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,14 +1025,14 @@ Extract specific attributes and discard the rest:
10251025

10261026
.. code-block:: html+twig
10271027

1028+
{# render component #}
1029+
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1030+
10281031
{# templates/components/MyComponent.html.twig #}
10291032
<div{{ attributes.only('class') }}>
10301033
My Component!
10311034
</div>
10321035

1033-
{# render component #}
1034-
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1035-
10361036
{# renders as: #}
10371037
<div class="foo">
10381038
My Component!
@@ -1045,14 +1045,14 @@ Exclude specific attributes:
10451045

10461046
.. code-block:: html+twig
10471047

1048+
{# render component #}
1049+
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1050+
10481051
{# templates/components/MyComponent.html.twig #}
10491052
<div{{ attributes.without('class') }}>
10501053
My Component!
10511054
</div>
10521055

1053-
{# render component #}
1054-
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1055-
10561056
{# renders as: #}
10571057
<div style="color:red">
10581058
My Component!

0 commit comments

Comments
 (0)