51 lines
1.7 KiB
PHP
Raw Normal View History

2022-06-01 10:15:55 +03:00
<th scope="col" class="{{ $class }}" {{ $attributes }}>
@if (!empty($first))
@php
$first_attributes = $first->attributes;
if ((! $first->attributes->has('override')) || ($first->attributes->has('override') && ! in_array('class', explode(',', $first->attributes->get('override'))))) {
$first_attributes = $first->attributes->merge(['class' => 'font-medium truncate']);
}
@endphp
<div {{ $first_attributes }}>
2022-10-20 16:49:39 +03:00
<!-- first div for restrict of width. With javascript will add (overflow-x-hidden) class name -->
2022-10-18 16:50:27 +03:00
<div>
2022-10-20 16:49:39 +03:00
<!-- There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons -->
2022-10-20 16:32:13 +03:00
<div>
2022-10-20 16:49:39 +03:00
<!-- this tag use for calculate width of text and parent element -->
2022-10-21 10:16:44 +03:00
<span data-truncate-marquee>
2022-10-20 16:32:13 +03:00
{!! $first !!}
</span>
</div>
2022-10-18 16:50:27 +03:00
</div>
2022-06-01 10:15:55 +03:00
</div>
@endif
@if (!empty($second))
@php
$second_attributes = $second->attributes;
if ((! $second->attributes->has('override')) || ($second->attributes->has('override') && ! in_array('class', explode(',', $second->attributes->get('override'))))) {
$second_attributes = $second->attributes->merge(['class' => 'font-normal truncate']);
}
@endphp
<div {{ $second_attributes }}>
2022-10-18 16:50:27 +03:00
<div>
2022-10-20 16:32:13 +03:00
<div>
2022-10-21 10:16:44 +03:00
<span data-truncate-marquee>
2022-10-20 16:32:13 +03:00
{!! $second !!}
</span>
</div>
2022-10-18 16:50:27 +03:00
</div>
2022-06-01 10:15:55 +03:00
</div>
@endif
2022-10-18 16:50:27 +03:00
<div>
2022-10-20 16:32:13 +03:00
<div>
2022-10-21 10:16:44 +03:00
<span data-truncate-marquee>
2022-10-20 16:32:13 +03:00
{{ $slot }}
</span>
</div>
2022-10-18 16:50:27 +03:00
</div>
2022-06-01 10:15:55 +03:00
</th>