mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-02 14:29:11 +02:00
- enhance plugin card ui - refactor components to be more consistent - invert toggler label for better UX - edit view components regex
31 lines
692 B
PHP
31 lines
692 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Views\Components\Forms;
|
|
|
|
class Textarea extends FormComponent
|
|
{
|
|
public function setValue(?string $value): void
|
|
{
|
|
if ($value) {
|
|
$this->value = htmlspecialchars_decode($value);
|
|
}
|
|
}
|
|
|
|
public function render(): string
|
|
{
|
|
$this->mergeClass('bg-elevated w-full rounded-lg border-3 border-contrast focus:border-contrast focus-within:ring-accent');
|
|
|
|
$this->attributes['id'] = $this->id;
|
|
|
|
$textarea = form_textarea(
|
|
$this->attributes,
|
|
old($this->name, $this->value ?? '', false)
|
|
);
|
|
|
|
return <<<HTML
|
|
{$textarea}
|
|
HTML;
|
|
}
|
|
}
|