Commit ed3dc44
committed
feature #2303 [Turbo] Add
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[Turbo] Add `<Turbo:Frame>` component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| License | MIT
I added a `<twig:Turbo:Frame>` component.
**Simple example**
```twig
<twig:Turbo:Frame id="the_frame_id" />
{# renders as: #}
<turbo-frame id="the_frame_id"></turbo-frame>
```
**With a HTML attributes**
```twig
<twig:Turbo:Frame id="the_frame_id" loading="lazy" src="{{ path('block') }}" />
{# renders as: #}
<turbo-frame id="the_frame_id" loading="lazy" src="https://example.com/block"></turbo-frame>
```
**With content**
```twig
<twig:Turbo:Frame id="the_frame_id" src="{{ path('block') }}">
A placeholder.
</twig:Turbo:Frame>
{# renders as: #}
<turbo-frame id="the_frame_id" src="https://example.com/block">A placeholder.
</turbo-frame>
```
Commits
-------
ed521df [Turbo] Add `<Turbo:Frame>` component<Turbo:Frame> component (seb-jean)File tree
3 files changed
+44
-0
lines changed- src/Turbo
- doc
- templates/components
3 files changed
+44
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
253 | 291 | | |
254 | 292 | | |
255 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments