app show page toggle styling

This commit is contained in:
Cüneyt Şentürk 2022-06-24 10:20:38 +03:00
parent 08bd469057
commit af515d470f

View File

@ -1,23 +1,23 @@
<x-form> <x-form>
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4"> <div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4" x-on:click="price_type = ! price_type">
<label for="priceToggle" class="flex items-center cursor-pointer" x-on:click="price_type = ! price_type"> <div class="relative" x-model="price_type">
<div class="relative"> <div class="w-36 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
<input type="checkbox" id="priceToggle" class="sr-only" x-model="price_type"> <button type="button"
class="w-18 flex justify-center px-2"
x-bind:class="price_type == true ? 'btn-outline-primary' : 'bg-white rounded-lg'"
>
{{ trans('general.monthly') }}
</button>
<div class="bg-purple-300 w-24 h-7 rounded-full"> <button type="button"
<span id="apps-toggle-monthly" class="monthly-badge text-xs text-white float-left ml-3 mt-1.5" x-show="price_type == true"> class="w-18 flex justify-center px-2"
{{ trans('general.monthly') }} x-bind:class="price_type == false ? 'btn-outline-primary' : 'bg-white rounded-lg'"
</span> >
{{ trans('general.yearly') }}
<span id="apps-toggle-yearly" class="yearly-badge text-xs text-white float-right mr-3 mt-1.5" x-show="price_type == false"> </button>
{{ trans('general.yearly') }}
</span>
</div>
<div class="dot absolute left-1 top-1 bg-white w-5 h-5 rounded-full transition"
x-bind:style="price_type == true ? 'transform: translateX(333%)' : ' transform: translateX(0) '"
></div>
</div> </div>
</label> </div>
</div> </div>
</x-form> </x-form>