Display Users

This commit is contained in:
Matt Young 2025-12-14 00:37:40 -06:00
parent e284693753
commit d755d53208
4 changed files with 57 additions and 0 deletions

View File

@ -3,6 +3,29 @@
<x-slot:header class="bg-brand-700!">Users</x-slot:header> <x-slot:header class="bg-brand-700!">Users</x-slot:header>
<x-slot:body class="bg-white! border border-brand-700"> <x-slot:body class="bg-white! border border-brand-700">
<div class="py-3">
<x-table>
<x-slot:header>
<x-table.th>Name</x-table.th>
<x-table.th>Email</x-table.th>
</x-slot:header>
@foreach($users as $user)
<tr>
<x-table.td>{{ $user->name }}</x-table.td>
<x-table.td>{{ $user->email }}</x-table.td>
</tr>
@endforeach
</x-table>
</div>
</x-slot:body> </x-slot:body>
</x-card> </x-card>
</x-layout.admin> </x-layout.admin>

View File

@ -0,0 +1,24 @@
@props(['header' => null])
<div class="px-3">
<div class="flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
<div
class="overflow-hidden shadow-sm outline-1 outline-black/5 sm:rounded-lg dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
<table class="relative min-w-full divide-y divide-gray-300 dark:divide-white/15">
@if($header)
<thead class="bg-gray-100 dark:bg-gray-800/75">
<tr>
{{ $header }}
</tr>
</thead>
@endif
<tbody class="divide-y divide-gray-200 bg-white dark:divide-white/10 dark:bg-gray-800/50">
{{ $slot }}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,7 @@
@props(['emphasis'=>false])
<td {{ $attributes->class([
'py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap text-gray-900 sm:pl-6 dark:text-white' => $emphasis,
'px-3 py-4 text-sm whitespace-nowrap text-gray-500 dark:text-gray-400' => ! $emphasis
]) }}>
{{ $slot }}
</td>

View File

@ -0,0 +1,3 @@
<th scope="col" {{ $attributes->merge(['class'=>'py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6 dark:text-gray-200']) }}>
{{ $slot }}
</th>