22 lines
400 B
PHP
22 lines
400 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class ExpandableText extends Component
|
|
{
|
|
public string $html = '';
|
|
public int $limit = 200;
|
|
public bool $expanded = false;
|
|
|
|
public function toggle(): void
|
|
{
|
|
$this->expanded = ! $this->expanded;
|
|
}
|
|
|
|
public function render(): \Illuminate\View\View
|
|
{
|
|
return view('livewire.expandable-text');
|
|
}
|
|
} |