Deploy Ladill Hosting / deploy (push) Successful in 1m8s
Sync mobile-header-btn partials, mobile x-btn.create, and update dashboard header actions for consistent mobile FABs. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
@props([
|
|
'href' => null,
|
|
'type' => 'button',
|
|
'label' => null,
|
|
])
|
|
|
|
@php
|
|
$tag = $href ? 'a' : 'button';
|
|
$ariaLabel = $label ?? trim(preg_replace('/\s+/', ' ', strip_tags((string) $slot)));
|
|
@endphp
|
|
|
|
<{{ $tag }}
|
|
@if ($href) href="{{ $href }}" @endif
|
|
@if ($tag === 'button') type="{{ $type }}" @endif
|
|
aria-label="{{ $ariaLabel }}"
|
|
title="{{ $ariaLabel }}"
|
|
{{ $attributes->class(['btn-fab h-10 w-10 lg:hidden']) }}
|
|
>
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/>
|
|
</svg>
|
|
</{{ $tag }}>
|
|
|
|
<{{ $tag }}
|
|
@if ($href) href="{{ $href }}" @endif
|
|
@if ($tag === 'button') type="{{ $type }}" @endif
|
|
{{ $attributes->class(['btn-primary hidden lg:inline-flex']) }}
|
|
>
|
|
<svg class="h-4 w-4 shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/>
|
|
</svg>
|
|
{{ $slot }}
|
|
</{{ $tag }}>
|