From 4351dab66377a9c3728a554a589646548807115d Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 20 Oct 2024 18:26:44 +0200 Subject: [PATCH] Add BooleanDisplay component --- app/View/Ui/BooleanDisplay.php | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/View/Ui/BooleanDisplay.php diff --git a/app/View/Ui/BooleanDisplay.php b/app/View/Ui/BooleanDisplay.php new file mode 100644 index 00000000..47043109 --- /dev/null +++ b/app/View/Ui/BooleanDisplay.php @@ -0,0 +1,40 @@ +value ? 'text-green-800 group-[.dark]:text-green-600' : 'text-red-800 group-[.dark]:text-red-600'; + } + + public function render() + { + return <<<'HTML' +
+
+ +
+
{{ $value ? $right : $wrong }}
+
+ HTML; + } +}