Skip to content

Commit 9e44360

Browse files
committed
minor #1659 [Icons] Accept <twig:ux:icon /> (lowercase) (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Icons] Accept <twig:ux:icon /> (lowercase) | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix #1657 | License | MIT Fix #1657 Allow ``` <twig:UX:Icon ... /> ``` and ``` <twig:ux:icon ... /> ``` Commits ------- 9c037b4 [Icons] Accept <twig:ux:icon /> (lowercase)
2 parents 0cddf32 + 9c037b4 commit 9e44360

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Icons/src/Twig/UXIconComponentListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828

2929
public function onPreCreateForRender(PreCreateForRenderEvent $event): void
3030
{
31-
if ('UX:Icon' !== $event->getName()) {
31+
if ('ux:icon' !== strtolower($event->getName())) {
3232
return;
3333
}
3434

src/Icons/tests/Fixtures/templates/template1.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<li id="second">{{ ux_icon('user') }}</li>
44
<li id="third">{{ ux_icon('sub:check', {'data-action': 'string "with" quotes'}) }}</li>
55
<li id="fifth"><twig:UX:Icon name="user" class="h-8 w-8" /></li>
6-
<li id="sixth"><twig:UX:Icon name="sub:check" /></li>
7-
<li id="seventh"><twig:UX:Icon :name="'sub:'~'check'" /></li>
6+
<li id="sixth"><twig:ux:icon name="sub:check" /></li>
7+
<li id="seventh"><twig:Ux:Icon :name="'sub:'~'check'" /></li>
88
<li id="eighth">{{ ux_icon('iconamoon:3d-duotone') }}</li>
99
</ul>

0 commit comments

Comments
 (0)