PlanRadioOptions

This commit is contained in:
salam committed 2025-09-30 14:06:03 +02:00
1 parent b00af65e72
commit 8463f50f6b
4 files changed
+72 -8

No files matched your search

@@ -0,0 +1,22 @@
@php
$state = $getState(); // Get the current state of the radio group
$options = $getOptions(); // Assuming you have a method to get options in your component
$name = $getName(); // Get the field name for the input
@endphp
<div>
@foreach ($options as $value => $label)
<label class="cursor-pointer">
<div
@if ($state === $value) class="flex border border-red-500 p-2" @else class="flex gap-3 border border-amber-500 p-12" @endif>
<input type="radio" name="{{ $name }}" value="{{ $value }}"
@if ($state === $value) checked @endif {{ $attributes->merge(['class' => 'form-radio']) }}
wire:model="{{ $name }}">
<h1 class="scroll-m-20 text-3xl md:text-4xl font-black tracking-tight lg:text-5xl text-shadow-sm">
{{ $label }}
</h1>
</div>
</label>
<br>
@endforeach
</div>