dealhub/resources/views/components/ui/button.blade.php
kusowl 2fba9f7ab8 refactor: replace user dashboard with explore page and improve broker UI components
- Removed `UserDashboardController` and related user dashboard views.
- Introduced `ExplorePageController` and redesigned `explore.blade.php` as the main user-facing page.
- Updated routing logic to redirect users (non-admin and non-broker) to the `explore` page.
- Added dedicated sidebar and layout components for the broker dashboard, improving structure and navigation.
2026-01-15 15:07:58 +05:30

31 lines
1002 B
PHP

@props(['variant' => '', 'icon' => '', 'link' => ''])
@php
$variants = [
'neutral' => 'bg-primary-600 text-white',
'red' => 'bg-red-500 text-white',
'ghost' => 'bg-gray-200 text-gray-900'
];
$variantClass = $variants[$variant] ?? '';
@endphp
@if($link !== '')
<a {{$attributes->merge(['class' => "block px-4 py-2 rounded-lg font-medium hover:opacity-80 $variantClass", 'href' => $link])}}>
<div class="flex justify-center items-center space-x-2">
@if($icon !=='')
@svg("heroicon-o-$icon", 'w-5 h-5')
@endif
<p>{{$slot}}</p>
</div>
</a>
@else
<button {{$attributes->merge(['class' => "px-4 py-2 rounded-lg font-medium hover:opacity-80 $variantClass"])}}>
<div class="flex justify-center items-center space-x-2">
@if($icon !=='')
@svg("heroicon-o-$icon", 'w-5 h-5')
@endif
<p>{{$slot}}</p>
</div>
</button>
@endif