mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00
31 lines
585 B
PHP
31 lines
585 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Views\Components;
|
|
|
|
use Override;
|
|
use ViewComponents\Component;
|
|
|
|
class Hint extends Component
|
|
{
|
|
protected array $attributes = [
|
|
'data-tooltip' => 'bottom',
|
|
'tabindex' => '0',
|
|
];
|
|
|
|
#[Override]
|
|
public function render(): string
|
|
{
|
|
$this->attributes['title'] = $this->slot;
|
|
|
|
$this->mergeClass('inline-block align-middle opacity-75');
|
|
|
|
$icon = icon('question-fill');
|
|
|
|
return <<<HTML
|
|
<span {$this->getStringifiedAttributes()}>{$icon}</span>
|
|
HTML;
|
|
}
|
|
}
|