Skip to content

Commit

Permalink
Remove superfluous md:hidden from the icon
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe committed Oct 8, 2023
1 parent 23e25b8 commit be93cff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 7 additions & 4 deletions resources/views/components/table/row-contents.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"

@class([
'hidden md:hidden bg-white dark:bg-gray-700 dark:text-white' => $component->isTailwind(),
'd-none d-md-none' => $component->isBootstrap()
'hidden bg-white dark:bg-gray-700 dark:text-white' => $component->isTailwind(),
'd-none' => $component->isBootstrap()
])
>
<td
Expand All @@ -47,10 +47,13 @@
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))

<p wire:key="{{ $tableName }}-row-{{ $row->{$this->getPrimaryKey()} }}-collapsed-contents-{{ $colIndex }}"

@class([
'block mb-2' => $component->isTailwind() && $column->shouldCollapseAlways(),
'block mb-2 sm:hidden' => $component->isTailwind() && $column->shouldCollapseOnMobile(),
'block mb-2 md:hidden' => $component->isTailwind() && $column->shouldCollapseOnTablet(),
'block mb-2 sm:hidden' => $component->isTailwind() && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(),
'block mb-2 md:hidden' => $component->isTailwind() && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(),
'block mb-2 lg:hidden' => $component->isTailwind() && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()),
'd-block mb-2' => $component->isBootstrap() && $column->shouldCollapseAlways(),
'd-block mb-2 d-sm-none' => $component->isBootstrap() && $column->shouldCollapseOnMobile(),
'd-block mb-2 d-md-none' => $component->isBootstrap() && $column->shouldCollapseOnTablet(),
Expand Down
14 changes: 5 additions & 9 deletions resources/views/components/table/td/row-contents.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@
@if (! $hidden) x-data="{open:false}" @endif
{{
$attributes
->merge(['class' => 'p-3 table-cell text-center'])
->class([
'md:hidden' =>
!$component->shouldCollapseAlways() && (
($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile())
)
])
->class(['sm:hidden' => !$component->shouldCollapseAlways() && $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()])
->merge(['class' => 'p-3 table-cell text-center '])
->class(['sm:hidden' => !$component->shouldCollapseAlways() && !$component->shouldCollapseOnTablet()])
->class(['md:hidden' => !$component->shouldCollapseAlways() && !$component->shouldCollapseOnTablet() && $component->shouldCollapseOnMobile()])
->class(['lg:hidden' => !$component->shouldCollapseAlways() && ($component->shouldCollapseOnTablet() || $component->shouldCollapseOnMobile())])
}}
:class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''"
>
Expand All @@ -34,6 +29,7 @@
@if (! $hidden) x-data="{open:false}" @endif
{{
$attributes
->class(['d-none' => !$component->shouldCollapseAlways()])
->class([
'd-md-none' => !$component->shouldCollapseAlways() && (
($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) ||
Expand Down

0 comments on commit be93cff

Please sign in to comment.