mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- set new colors using the css variables for theming in tailwind.config.js - replace admin and public colors with new variable enabled colors
31 lines
606 B
PHP
31 lines
606 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Views\Components;
|
|
|
|
use ViewComponents\Component;
|
|
|
|
class IconButton extends Component
|
|
{
|
|
public string $glyph = '';
|
|
|
|
public function render(): string
|
|
{
|
|
$attributes = [
|
|
'isSquared' => 'true',
|
|
'title' => $this->slot,
|
|
'data-tooltip' => 'bottom',
|
|
];
|
|
|
|
$attributes = array_merge($attributes, $this->attributes);
|
|
|
|
$attributes['slot'] = icon($this->glyph);
|
|
|
|
unset($attributes['glyph']);
|
|
|
|
$iconButton = new Button($attributes);
|
|
return $iconButton->render();
|
|
}
|
|
}
|