From 3199a2d5fba7186857c97e4932d659842a24fda6 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 24 Oct 2024 23:05:12 +0200 Subject: [PATCH] Add Badge component --- app/View/Page/Header.php | 9 ++--- app/View/Page/Layout.php | 2 +- app/View/Page/SettingLayout.php | 3 ++ app/View/Ui/Badge.php | 33 +++++++++++++++++++ .../Components/setting-view.blade.php | 4 ++- 5 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 app/View/Ui/Badge.php diff --git a/app/View/Page/Header.php b/app/View/Page/Header.php index 40fb1924..d99f3adb 100644 --- a/app/View/Page/Header.php +++ b/app/View/Page/Header.php @@ -7,7 +7,7 @@ use Illuminate\View\Component; class Header extends Component { - public function __construct(public string $title, public bool $closeable = false) + public function __construct(public string $title) { } @@ -15,17 +15,12 @@ class Header extends Component { return <<<'HTML'
-
+
{{ $beforeTitle ?? ''}} {{ $title }} {{ $toolbar ?? '' }}
- @if ($closeable) - - - - @endif {{ $right ?? '' }}
diff --git a/app/View/Page/Layout.php b/app/View/Page/Layout.php index 1d081eba..76ed437f 100644 --- a/app/View/Page/Layout.php +++ b/app/View/Page/Layout.php @@ -28,7 +28,7 @@ class Layout extends Component