adrema/app/View/Ui/Sprite.php

22 lines
379 B
PHP
Raw Normal View History

2024-09-23 23:49:17 +02:00
<?php
2024-10-13 21:00:47 +02:00
namespace App\View\Ui;
2024-09-23 23:49:17 +02:00
use Illuminate\View\Component;
class Sprite extends Component
{
public function __construct(
public string $src = '',
) {
}
public function render()
{
return <<<'HTML'
2024-10-26 15:04:24 +02:00
<svg {{ $attributes->merge(['class' => 'fill-current']) }}><use xlink:href="/sprite.svg#{{$src}}" /></svg>
2024-09-23 23:49:17 +02:00
HTML;
}
}