feat: replace some partials with twig components

This commit is contained in:
Björn Fromme
2024-03-01 11:13:47 +01:00
parent a668dcb326
commit f722afe7ff
23 changed files with 205 additions and 96 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Twig\Components;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent(template: 'components/dropdown.html.twig')]
class DropDown
{
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Twig\Components;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent(template: 'components/messagebox.html.twig')]
class MessageBox
{
public string $message;
public string $type = 'info';
}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace App\Twig\Components;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent(template: 'components/rating_stars.html.twig')]
class RatingStars
{
public ?int $averageRating;
}