Files
Virtnet.bond/extensions/Servers/Proxmox/views/components/ui/dropdown-item.blade.php
Joseph.Rawlings b4e2923a2c refactor: update Proxmox UI components to use TailAdmin styling
- Changed component styles and classes to align with TailAdmin design patterns.
- Updated color schemes, typography, and layout for consistency across components.
- Refactored Info Row, Network Address Card, Notice Banner, Progress Bar, Resource Gauge, Section Header, Server Status, Spinner, Stat Card, and Tab Panel components.
- Enhanced responsiveness and accessibility features in various components.
2025-12-17 12:33:10 -05:00

39 lines
1.2 KiB
PHP

{{--
Dropdown Item Component - TailAdmin style
--}}
@props([
'href' => null,
'icon' => null,
'variant' => 'default',
'disabled' => false,
])
@php
$tag = $href ? 'a' : 'button';
$variantClasses = [
'default' => 'text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white',
'danger' => 'text-error-600 hover:bg-error-50 dark:text-error-400 dark:hover:bg-error-500/10',
'success' => 'text-success-600 hover:bg-success-50 dark:text-success-400 dark:hover:bg-success-500/10',
];
$variantClass = $variantClasses[$variant] ?? $variantClasses['default'];
@endphp
<{{ $tag }}
@if($href) href="{{ $href }}" @endif
@if($tag === 'button') type="button" @endif
@if($disabled) disabled @endif
{{ $attributes->class([
'relative flex w-full cursor-pointer select-none items-center gap-2.5 rounded-lg px-3 py-2 text-theme-sm outline-none transition-colors duration-150',
$variantClass,
'pointer-events-none opacity-50' => $disabled,
]) }}
>
@if($icon)
<x-dynamic-component :component="$icon" class="size-4.5" />
@endif
<span class="flex-1 text-left">{{ $slot }}</span>
</{{ $tag }}>