pianello-api/resources/views/components/base/form-switch/input.blade.php
Ale Gallo 96c0bfb8ce Committing laravel (part 5)
committing blade templating files and components that might come in handy
2023-11-10 16:41:20 +01:00

18 lines
827 B
PHP

<x-base.form-check.input
data-tw-merge
{{ $attributes->class(
merge([
// Default
'w-[38px] h-[24px] p-px rounded-full relative',
'before:w-[20px] before:h-[20px] before:shadow-[1px_1px_3px_rgba(0,0,0,0.25)] before:transition-[margin-left] before:duration-200 before:ease-in-out before:absolute before:inset-y-0 before:my-auto before:rounded-full before:dark:bg-darkmode-600',
// On checked
'checked:bg-primary checked:border-primary checked:bg-none',
'before:checked:ml-[14px] before:checked:bg-white',
$attributes->whereStartsWith('class')->first(),
]),
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
>
{{ $slot }}
</x-base.form-check.input>