mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-09 04:09:24 +02:00
30 lines
567 B
PHP
30 lines
567 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Views\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;
|
|
}
|
|
}
|