- Refactored select component to align with shadcn design principles. - Updated server status indicator component for consistency with shadcn style. - Modified spinner component to follow shadcn design guidelines. - Enhanced stat card component with shadcn-inspired styles. - Adjusted tab panel component to reflect shadcn design updates. - Revamped table row and table data cell components to match shadcn aesthetics. - Updated table header cell component for improved styling consistency. - Refined table component to align with shadcn design principles. - Enhanced tabs component with shadcn-inspired styles. - Updated toggle component to follow shadcn design guidelines. - Refactored tooltip component to align with shadcn design principles. - Updated server card component to reflect shadcn-inspired design.
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
{{--
|
|
Dropdown Item Component - shadcn-style
|
|
--}}
|
|
|
|
@props([
|
|
'href' => null,
|
|
'icon' => null,
|
|
'variant' => 'default',
|
|
'disabled' => false,
|
|
])
|
|
|
|
@php
|
|
$tag = $href ? 'a' : 'button';
|
|
|
|
$variantClasses = [
|
|
'default' => 'text-foreground hover:bg-accent hover:text-accent-foreground',
|
|
'danger' => 'text-danger focus:bg-danger/10 focus:text-danger',
|
|
'success' => 'text-success focus:bg-success/10 focus:text-success',
|
|
];
|
|
|
|
$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 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors duration-100 w-full',
|
|
$variantClass,
|
|
'pointer-events-none opacity-50' => $disabled,
|
|
]) }}
|
|
>
|
|
@if($icon)
|
|
<x-dynamic-component :component="$icon" class="size-4" />
|
|
@endif
|
|
<span class="flex-1 text-left">{{ $slot }}</span>
|
|
</{{ $tag }}>
|