-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2770 from Leantime/table-component
Table component
- Loading branch information
Showing
9 changed files
with
494 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<td {{ $attributes->merge(['class' => 'px-6 py-4 text-sm text-gray-500']) }}> | ||
{{ $slot }} | ||
</td> |
3 changes: 3 additions & 0 deletions
3
app/Views/Templates/components/elements/table/footer.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<tr {{ $attributes->merge(['class' => 'text-left text-xs font-medium text-gray-500 tracking-wider']) }}> | ||
{{ $slot }} | ||
</tr> |
3 changes: 3 additions & 0 deletions
3
app/Views/Templates/components/elements/table/header-cell.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<th {{ $attributes->merge(['class' => 'px-6 py-3']) }}> | ||
{{ $slot }} | ||
</th> |
3 changes: 3 additions & 0 deletions
3
app/Views/Templates/components/elements/table/header.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<tr {{ $attributes->merge(['class' => 'text-left text-xs font-medium text-gray-500 tracking-wider']) }}> | ||
{{ $slot }} | ||
</tr> |
24 changes: 24 additions & 0 deletions
24
app/Views/Templates/components/elements/table/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@props([ | ||
'header', | ||
'body', | ||
'footer', | ||
'extraClass' => '' | ||
]) | ||
|
||
<table {{ $attributes->merge(['class' => 'table table-bordered min-w-full bg-white border-separate border-spacing-0 '.$extraClass ]) }}> | ||
@if(isset($header)) | ||
<thead class="bg-gray-50"> | ||
{{ $header }} | ||
</thead> | ||
@endif | ||
|
||
<tbody class="bg-white divide-y divide-gray-200"> | ||
{{ $body }} | ||
</tbody> | ||
|
||
@if(isset($footer)) | ||
<tfoot class="bg-gray-50"> | ||
{{ $footer }} | ||
</tfoot> | ||
@endif | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<tr {{ $attributes->merge(['class' => 'hover:bg-gray-50']) }}> | ||
{{ $slot }} | ||
</tr> |