adrema/modules/Base/Components/Page/Header.php

35 lines
1.1 KiB
PHP

<?php
namespace Modules\Base\Components\Page;
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;
}
}