Set active title for setting
This commit is contained in:
parent
efdce00ad0
commit
d885699fc9
|
@ -7,7 +7,7 @@ use Illuminate\View\Component;
|
||||||
class Layout extends Component
|
class Layout extends Component
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct(public string $pageClass = '')
|
public function __construct(public string $pageClass = '', public string $title = '')
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class Layout extends Component
|
||||||
return <<<'HTML'
|
return <<<'HTML'
|
||||||
<div class="grow flex flex-col" @refresh-page.window="$wire.$refresh">
|
<div class="grow flex flex-col" @refresh-page.window="$wire.$refresh">
|
||||||
<div class="grow bg-gray-900 flex flex-col duration-300 navbar:ml-60">
|
<div class="grow bg-gray-900 flex flex-col duration-300 navbar:ml-60">
|
||||||
<x-page::header title="{{ session()->get('title') }}">
|
<x-page::header :title="$title">
|
||||||
<x-slot:beforeTitle>
|
<x-slot:beforeTitle>
|
||||||
<a href="#" class="lg:hidden" wire:click.prevent="dispatch('toggle-sidebar')">
|
<a href="#" class="lg:hidden" wire:click.prevent="dispatch('toggle-sidebar')">
|
||||||
<x-ui::sprite src="menu" class="text-gray-100 w-5 h-5"></x-ui::sprite>
|
<x-ui::sprite src="menu" class="text-gray-100 w-5 h-5"></x-ui::sprite>
|
||||||
|
|
|
@ -23,7 +23,7 @@ class SettingLayout extends Component
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return <<<'HTML'
|
return <<<'HTML'
|
||||||
<x-page::layout>
|
<x-page::layout :title="$active::title()">
|
||||||
<x-slot:right>
|
<x-slot:right>
|
||||||
{{ $right ?? '' }}
|
{{ $right ?? '' }}
|
||||||
</x-slot:right>
|
</x-slot:right>
|
||||||
|
|
Loading…
Reference in New Issue