- Changed badge, button, card, dropdown, input, modal, select, table, tabs, toggle, and tooltip components to align with the TailAdmin design system. - Updated class names and styles for consistency across components. - Enhanced accessibility and responsiveness in various components. - Improved hover and focus states for better user experience.
37 lines
813 B
PHP
37 lines
813 B
PHP
{{--
|
|
Table Row Component - TailAdmin style
|
|
--}}
|
|
|
|
@props([
|
|
'clickable' => false,
|
|
'href' => null,
|
|
'hoverable' => null,
|
|
])
|
|
|
|
@php
|
|
// Check parent table's hoverable attribute if not explicitly set
|
|
$isHoverable = $hoverable ?? true;
|
|
@endphp
|
|
|
|
@if($href)
|
|
<tr
|
|
{{ $attributes->class([
|
|
'cursor-pointer transition-colors duration-150',
|
|
'hover:bg-gray-50 dark:hover:bg-gray-800/50' => $isHoverable,
|
|
]) }}
|
|
onclick="window.location='{{ $href }}'"
|
|
>
|
|
{{ $slot }}
|
|
</tr>
|
|
@else
|
|
<tr
|
|
{{ $attributes->class([
|
|
'transition-colors duration-150',
|
|
'hover:bg-gray-50 dark:hover:bg-gray-800/50' => $isHoverable,
|
|
'cursor-pointer' => $clickable,
|
|
]) }}
|
|
>
|
|
{{ $slot }}
|
|
</tr>
|
|
@endif
|