Skip to content

Commit

Permalink
Update payment options
Browse files Browse the repository at this point in the history
  • Loading branch information
rayc2045 committed May 26, 2024
1 parent cf688cf commit ca179d4
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions src/pages/shop/checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h2 class="text-xl font-bold">Billing details</h2>
<template x-for="block in billingDetails" :key="block.title">
<label
:for="block.title"
class="block px-3 py-2 rounded-md border border-gray-400 invalid:border-red-500 invalid:text-red-600 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600 shadow-sm overflow-hidden space-y-1"
class="block px-3 py-2 space-y-1 rounded-md border border-gray-500 invalid:border-red-500 shadow-sm overflow-hidden invalid:text-red-500 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500"
>
<span
x-text="block.title"
Expand Down Expand Up @@ -116,28 +116,27 @@ <h2 class="text-xl font-bold">Payment Options</h2>
<div>
<label
:for="option.title"
class="block p-4 space-y-2 border border-gray-400 rounded-lg shadow-sm cursor-pointer has-[:checked]:border-blue-500 has-[:checked]:ring-1 has-[:checked]:ring-blue-500"
class="block p-4 space-y-2 border border-gray-500 rounded-lg shadow-sm cursor-pointer has-[:checked]:border-blue-500 has-[:checked]:ring-1 has-[:checked]:ring-blue-500"
:class="option.checked && 'bg-blue-100/75'"
>
<div class="flex justify-between items-end">
<p
x-text="option.title"
:class="option.checked ? 'text-gray-700 font-semibold' : 'text-gray-400'"
></p>
<input
type="radio"
name="paymentOption"
:id="option.title"
:value="option.title"
:checked="option.checked"
@input="paymentOptions.forEach((opt, idx) => opt.checked = (idx === optionIdx))"
class="size-5"
/>
</div>
<h3
x-text="option.title"
:class="option.checked ? 'text-gray-700 font-semibold' : 'text-gray-500'"
></h3>
<p
x-show="option.checked"
x-text="option.note"
class="text-gray-500 text-sm"
></p>
<input
type="radio"
class="sr-only"
name="paymentOption"
:id="option.title"
:value="option.title"
:checked="option.checked"
@input="paymentOptions.forEach((opt, idx) => opt.checked = (idx === optionIdx))"
/>
</label>
</div>
</template>
Expand Down

0 comments on commit ca179d4

Please sign in to comment.