castopod/app/Views/Components/Forms/XMLEditor.php
Yassine Doghri 7a276764e6 feat(themes): add ViewThemes library to set views in root themes folder
app, admin, install and authentication views are now located in root themes/ folder
2021-12-29 11:54:52 +00:00

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;
}
}