Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] Fix documentations codeblocks for the LiveComponent integration #2412

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/Map/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ Usage with Live Components
To use a Map inside a Live Component, you need to use the ``ComponentWithMapTrait`` trait
and implement the method ``instantiateMap`` to return a ``Map`` instance.

You can interact with the Map by using ``LiveAction`` attribute:

.. code-block::
You can interact with the Map by using ``LiveAction`` attribute::

namespace App\Twig\Components;

Expand Down Expand Up @@ -382,9 +380,7 @@ Then, you can render the map with ``ux_map()`` in your component template:
</div>

Then, you can define `Live Actions`_ to interact with the map from the client-side.
You can retrieve the map instance using the ``getMap()`` method, and change the map center, zoom, add markers, etc.

.. code-block::
You can retrieve the map instance using the ``getMap()`` method, and change the map center, zoom, add markers, etc::

#[LiveAction]
public function doSomething(): void
Expand Down