Skip to content

Commit 5c3bcd4

Browse files
committed
Merge branch 'feature-table-class' of https://github.com/CristhoferMF/laravel-livewire-tables into CristhoferMF-feature-table-class
2 parents 91f1f2b + 30f3107 commit 5c3bcd4

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

resources/views/bootstrap-4/components/table/table.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])
22

33
<div class="{{ $this->responsive ? 'table-responsive' : '' }}">
4-
<table {{ $attributes->except('wire:sortable') }} class="table table-striped">
4+
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'table table-striped'}}">
55
<thead>
66
<tr>
77
{{ $head }}

resources/views/bootstrap-4/includes/table.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:customSecondaryHeader="$secondaryHeader"
44
:useHeaderAsFooter="$useHeaderAsFooter"
55
:customFooter="$customFooter"
6+
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
67
>
78
<x-slot name="head">
89
@if ($reordering)

resources/views/bootstrap-5/components/table/table.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])
22

33
<div class="{{ $this->responsive ? 'table-responsive' : '' }}">
4-
<table {{ $attributes->except('wire:sortable') }} class="table table-striped">
4+
@dump($attributes)
5+
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'table table-striped'}}">
56
<thead>
67
<tr>
78
{{ $head }}

resources/views/bootstrap-5/includes/table.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:customSecondaryHeader="$secondaryHeader"
44
:useHeaderAsFooter="$useHeaderAsFooter"
55
:customFooter="$customFooter"
6+
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
67
>
78
<x-slot name="head">
89
@if ($reordering)

resources/views/tailwind/components/table/table.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])
22

33
<div class="align-middle min-w-full overflow-x-auto shadow overflow-hidden rounded-none md:rounded-lg">
4-
<table {{ $attributes->except('wire:sortable') }} class="min-w-full divide-y divide-gray-200 dark:divide-none">
4+
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'min-w-full divide-y divide-gray-200 dark:divide-none'}}">
55
<thead>
66
<tr>
77
{{ $head }}

resources/views/tailwind/includes/table.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:customSecondaryHeader="$secondaryHeader"
44
:useHeaderAsFooter="$useHeaderAsFooter"
55
:customFooter="$customFooter"
6+
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
67
>
78
<x-slot name="head">
89
@if ($reordering)

0 commit comments

Comments
 (0)