mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 15:26:43 +02:00
- update Component class structure and remove component helper function and ComponentLoader - update residual activitypub naming to fediverse
29 lines
566 B
PHP
29 lines
566 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\View\Components\Forms;
|
|
|
|
use ViewComponents\Component;
|
|
|
|
class XMLEditor extends Component
|
|
{
|
|
/**
|
|
* @var array<string, string>
|
|
*/
|
|
protected array $attributes = [
|
|
'rows' => '5',
|
|
'class' => 'textarea',
|
|
];
|
|
|
|
public function render(): string
|
|
{
|
|
$content = $this->slot;
|
|
$this->attributes['slot'] = 'textarea';
|
|
$textarea = form_textarea($this->attributes, $content);
|
|
|
|
return <<<HTML
|
|
<xml-editor>{$textarea}</time-ago>
|
|
HTML;
|
|
}
|
|
}
|