- Add TableHeader DTO - Refactor Toggle component to have checked prop, as wire:model does not work - add null collasing for php 8.5 strict compatibility in scope directive - refactor card component so that actions stay on the right - make button component scaled small on active and change color on hover
17 lines
781 B
PHP
17 lines
781 B
PHP
@props(['disabled' => false, 'label' => null, 'checked' => false])
|
|
|
|
<label class="relative inline-flex items-center cursor-pointer">
|
|
<input
|
|
type="checkbox"
|
|
@checked($checked)
|
|
{{ $disabled ? 'disabled' : '' }}
|
|
{{ $attributes->merge(['class' => 'sr-only peer']) }}
|
|
>
|
|
|
|
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
|
|
|
|
@if($label)
|
|
<span class="ml-3 text-sm font-medium text-gray-900">{{ $label }}</span>
|
|
@endif
|
|
</label>
|