feat: replace some partials with twig components
This commit is contained in:
@@ -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