-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview-toggle.blade.php
More file actions
30 lines (30 loc) · 1.62 KB
/
view-toggle.blade.php
File metadata and controls
30 lines (30 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="inline-flex rounded-md shadow-sm">
<button
type="button"
wire:click="toggleViewMode"
@class([
'inline-flex items-center px-3 py-2 text-sm font-medium rounded-l-md border',
'bg-white text-gray-500 hover:bg-gray-50 border-gray-300' => $this->viewMode !== 'cards',
'bg-gray-100 text-gray-900 border-gray-300 z-10' => $this->viewMode === 'cards',
])
title="Card view"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" />
</svg>
</button>
<button
type="button"
wire:click="toggleViewMode"
@class([
'inline-flex items-center px-3 py-2 text-sm font-medium rounded-r-md border -ml-px',
'bg-white text-gray-500 hover:bg-gray-50 border-gray-300' => $this->viewMode !== 'table',
'bg-gray-100 text-gray-900 border-gray-300 z-10' => $this->viewMode === 'table',
])
title="Table view"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 010 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 010 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 010 2H4a1 1 0 01-1-1z" clip-rule="evenodd" />
</svg>
</button>
</div>