Skip to content

Commit

Permalink
Merge branch 'feature-table-class' of https://github.com/CristhoferMF…
Browse files Browse the repository at this point in the history
…/laravel-livewire-tables into CristhoferMF-feature-table-class
  • Loading branch information
rappasoft committed Oct 15, 2021
2 parents 91f1f2b + 30f3107 commit 5c3bcd4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])

<div class="{{ $this->responsive ? 'table-responsive' : '' }}">
<table {{ $attributes->except('wire:sortable') }} class="table table-striped">
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'table table-striped'}}">
<thead>
<tr>
{{ $head }}
Expand Down
1 change: 1 addition & 0 deletions resources/views/bootstrap-4/includes/table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:customSecondaryHeader="$secondaryHeader"
:useHeaderAsFooter="$useHeaderAsFooter"
:customFooter="$customFooter"
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
>
<x-slot name="head">
@if ($reordering)
Expand Down
3 changes: 2 additions & 1 deletion resources/views/bootstrap-5/components/table/table.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])

<div class="{{ $this->responsive ? 'table-responsive' : '' }}">
<table {{ $attributes->except('wire:sortable') }} class="table table-striped">
@dump($attributes)
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'table table-striped'}}">
<thead>
<tr>
{{ $head }}
Expand Down
1 change: 1 addition & 0 deletions resources/views/bootstrap-5/includes/table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:customSecondaryHeader="$secondaryHeader"
:useHeaderAsFooter="$useHeaderAsFooter"
:customFooter="$customFooter"
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
>
<x-slot name="head">
@if ($reordering)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/tailwind/components/table/table.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@props(['customSecondaryHeader' => false, 'useHeaderAsFooter' => false, 'customFooter' => false])

<div class="align-middle min-w-full overflow-x-auto shadow overflow-hidden rounded-none md:rounded-lg">
<table {{ $attributes->except('wire:sortable') }} class="min-w-full divide-y divide-gray-200 dark:divide-none">
<table {{ $attributes->except(['wire:sortable','class']) }} class="{{trim($attributes->get("class")) ?: 'min-w-full divide-y divide-gray-200 dark:divide-none'}}">
<thead>
<tr>
{{ $head }}
Expand Down
1 change: 1 addition & 0 deletions resources/views/tailwind/includes/table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:customSecondaryHeader="$secondaryHeader"
:useHeaderAsFooter="$useHeaderAsFooter"
:customFooter="$customFooter"
:class="method_exists($this, 'setTableClass') ? ' ' . $this->setTableClass() : '' "
>
<x-slot name="head">
@if ($reordering)
Expand Down

0 comments on commit 5c3bcd4

Please sign in to comment.