Skip to content

Commit 4b0e79c

Browse files
committed
CS
1 parent 6022726 commit 4b0e79c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A real-time product search component might look like this::
4242
}
4343
}
4444

45-
.. code-block:: html+twig
45+
.. code-block:: twig
4646
4747
{# templates/components/ProductSearch.html.twig #}
4848
{# for the Live Component to work, there must be a single root element
@@ -2236,7 +2236,7 @@ Defer Rendering
22362236
If a component is heavy to render, you can defer rendering it until after
22372237
the page has loaded. To do this, add the ``defer`` option:
22382238

2239-
.. code-block:: html+twig
2239+
.. code-block:: twig
22402240
22412241
{{ component('SomeHeavyComponent', { defer: true }) }}
22422242
@@ -2252,21 +2252,21 @@ real component once the page has loaded.
22522252
To add some loading text before the real component is loaded, use the
22532253
``loading-template`` option to point to a template:
22542254

2255-
.. code-block:: html+twig
2255+
.. code-block:: twig
22562256
22572257
{{ component('SomeHeavyComponent', { defer: true, loading-template: 'spinning-wheel.html.twig' }) }}
22582258
22592259
Or override the ``loadingContent`` block:
22602260

2261-
.. code-block:: html+twig
2261+
.. code-block:: twig
22622262
22632263
{% component SomeHeavyComponent with { defer: true }) }}
22642264
{% block loadingContent %}Loading...{% endblock %}
22652265
{{ end_component() }}
22662266
22672267
To change the initial tag from a ``div`` to something else, use the ``loading-tag`` option:
22682268

2269-
.. code-block:: html+twig
2269+
.. code-block:: twig
22702270
22712271
{{ component('SomeHeavyComponent', { defer: true, loading-tag: 'span' }) }}
22722272
@@ -2282,11 +2282,11 @@ This is useful for components that are far down the page and are not needed unti
22822282

22832283
To use this, add the ``lazy`` attribute to your component:
22842284

2285-
.. code-block:: html+twig
2285+
.. code-block:: twig
22862286
22872287
{{ component('SomeHeavyComponent', { lazy: true }) }}
22882288
2289-
.. code-block:: html+twig
2289+
.. code-block:: twig
22902290
22912291
<twig:Acme foo="bar" lazy />
22922292

0 commit comments

Comments
 (0)