Skip to content

Commit 356dbc2

Browse files
nicolas-grekasKocal
authored andcommitted
Add <twig:Turbo:Stream:*> components
1 parent bca5384 commit 356dbc2

15 files changed

+70
-50
lines changed

src/Turbo/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Add `Helper/TurboStream::append()` et al. methods
66
- Add `TurboStreamResponse`
7+
- Add `<twig:Turbo:Stream:*>` components
78

89
## 2.19.0
910

src/Turbo/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"symfony/property-access": "^5.4|^6.0|^7.0",
5353
"symfony/security-core": "^5.4|^6.0|^7.0",
5454
"symfony/stopwatch": "^5.4|^6.0|^7.0",
55+
"symfony/ux-twig-component": "^2.0",
5556
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
5657
"symfony/web-profiler-bundle": "^5.4|^6.0|^7.0",
5758
"symfony/webpack-encore-bundle": "^2.1.1",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target -%}
2+
3+
<turbo-stream action="after" targets="{{ target }}" {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target -%}
2+
3+
<turbo-stream action="append" targets="{{ target }}" {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target -%}
2+
3+
<turbo-stream action="before" targets="{{ target }}" {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target -%}
2+
3+
<turbo-stream action="prepend" targets="{{ target }}" {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% props requestId = null -%}
2+
3+
<turbo-stream action="refresh"{% if requestId is not null %} request-id="{{ requestId }}"{% endif %} {{ attributes }}></turbo-stream>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% props target -%}
2+
3+
<turbo-stream action="remove" targets="{{ target }}" {{ attributes }}></turbo-stream>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target, morph = false -%}
2+
3+
<turbo-stream action="replace" targets="{{ target }}"{% if morph %} method="morph"{% endif %} {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% props target, morph = false -%}
2+
3+
<turbo-stream action="update" targets="{{ target }}"{% if morph %} method="morph"{% endif %} {{ attributes }}>
4+
<template>{% block content %}{% endblock %}</template>
5+
</turbo-stream>

0 commit comments

Comments
 (0)