feat: replace some partials with twig components
This commit is contained in:
1 parent
a668dcb326
commit
f722afe7ff
23 files changed
+205
-96
No files matched your search
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Twig\Components;
|
||||
|
||||
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
|
||||
|
||||
#[AsTwigComponent(template: 'components/dropdown.html.twig')]
|
||||
class DropDown
|
||||
{
|
||||
}
|
||||
@@ -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';
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user