@props([ 'href' => url()->previous(), // Por defecto vuelve a la página anterior 'label' => 'Atrás', // Texto del botón 'color' => 'gray', // Colores: gray, blue, red, etc. 'icon' => '⬅️', // Icono predeterminado ]) @php $colors = [ 'gray' => 'bg-gray-200 text-gray-800 hover:bg-gray-300', 'blue' => 'bg-blue-600 text-white hover:bg-blue-700', 'red' => 'bg-red-600 text-white hover:bg-red-700', ]; $classes = ($colors[$color] ?? $colors['gray']) . ' inline-flex items-center gap-2 px-3 py-2 rounded-md font-medium transition-colors'; @endphp merge(['class' => $classes]) }}> {{ $label }}