From 1081cf2b70d03c91c03f91d2b3b22c378002ddb5 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; + } +}