20 lines
522 B
PHP
20 lines
522 B
PHP
@props([
|
|
'label',
|
|
'value',
|
|
'model' => null,
|
|
])
|
|
|
|
@php
|
|
$isActive = collect($attributes->wire('model')->value())->contains($value);
|
|
@endphp
|
|
|
|
<button
|
|
type="button"
|
|
wire:click="$toggle('{{ $model }}', '{{ $value }}')"
|
|
class="px-3 py-1.5 rounded-full text-sm font-medium border transition
|
|
{{ $isActive
|
|
? 'bg-white/20 text-white border-white/20'
|
|
: 'bg-white/5 text-white/60 border-white/10 hover:bg-white/10 hover:text-white' }}">
|
|
{{ $label }}
|
|
</button>
|