2024-09-24 01:26:08 +02:00
|
|
|
<?php
|
|
|
|
|
2024-10-13 21:00:47 +02:00
|
|
|
namespace App\View\Page;
|
2024-09-24 01:26:08 +02:00
|
|
|
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
|
|
|
|
class Header extends Component
|
|
|
|
{
|
|
|
|
|
|
|
|
public function __construct(public string $title, public bool $closeable = false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function render()
|
|
|
|
{
|
|
|
|
return <<<'HTML'
|
|
|
|
<div class="h-16 px-6 flex items-center justify-between border-b border-solid border-gray-600 group-[.is-bright]:border-gray-500">
|
|
|
|
<div class="flex items-center space-x-2">
|
|
|
|
{{ $beforeTitle ?? ''}}
|
|
|
|
<span class="text-sm md:text-xl font-semibold leading-none text-white">{{ $title }}</span>
|
|
|
|
{{ $toolbar ?? '' }}
|
|
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-4 ml-2">
|
|
|
|
@if ($closeable)
|
|
|
|
<a href="#" class="btn label btn-primary-light icon" wire:click="close">
|
|
|
|
<ui-sprite class="w-3 h-3" src="close"></ui-sprite>
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
{{ $right ?? '' }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
HTML;
|
|
|
|
}
|
|
|
|
}
|