From 9ee2993556c410892430d3e56f3defadce75d417 Mon Sep 17 00:00:00 2001 From: Andy Hinkle Date: Sat, 4 Nov 2023 22:48:48 -0500 Subject: [PATCH] Add "Include Legend" checkbox --- app/Livewire/CreateCode.php | 2 ++ resources/views/components/legend.blade.php | 8 ++++++-- resources/views/livewire/create-code.blade.php | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Livewire/CreateCode.php b/app/Livewire/CreateCode.php index c062bb5..e50363c 100644 --- a/app/Livewire/CreateCode.php +++ b/app/Livewire/CreateCode.php @@ -7,6 +7,8 @@ class CreateCode extends Component { + public bool $includeLegend = true; + public string $message; protected array $symbols = [ diff --git a/resources/views/components/legend.blade.php b/resources/views/components/legend.blade.php index 2910596..8dbef2f 100644 --- a/resources/views/components/legend.blade.php +++ b/resources/views/components/legend.blade.php @@ -1,8 +1,12 @@ -@props(['letters']) +@props(['letters', 'includeLegend' => true])
@foreach ($letters as $letter => $symbol) -
+
! $includeLegend, + ])> {{ ucwords($letter) }} {{ $symbol }}
diff --git a/resources/views/livewire/create-code.blade.php b/resources/views/livewire/create-code.blade.php index 7892adf..9eface2 100644 --- a/resources/views/livewire/create-code.blade.php +++ b/resources/views/livewire/create-code.blade.php @@ -4,6 +4,10 @@ class="bg-white/10 text-white py-2 px-3 rounded-xl w-full">
+
+ + +
@@ -11,6 +15,6 @@ class="bg-white/10 text-white py-2 px-3 rounded-xl w-full"> @if ($message) - + @endif