castopod/app/Views/Components/Charts/ChartsComponent.php
Yassine Doghri a746a781b4 feat(themes): set generic css variables for colors to enable instance themes
- set new colors using the css variables for theming in tailwind.config.js
- replace admin and
public colors with new variable enabled colors
2021-12-29 12:06:10 +00:00

27 lines
631 B
PHP

<?php
declare(strict_types=1);
namespace App\Views\Components\Charts;
use ViewComponents\Component;
class ChartsComponent extends Component
{
protected string $title = '';
protected string $dataUrl = '';
protected string $type = '';
public function render(): string
{
return <<<HTML
<div class="bg-elevated border-3 rounded-xl border-subtle {$this->class}">
<h2 class="px-6 py-4 text-xl">{$this->title}</h2>
<div class="w-full h-[500px]" data-chart-type="{$this->type}" data-chart-url="{$this->dataUrl}"></div>
</div>
HTML;
}
}