-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the style of table buttons (#80)
- Loading branch information
1 parent
2beaac8
commit b3d6edc
Showing
4 changed files
with
29 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
<button | ||
@class([ | ||
'flex items-center gap-1 px-3 py-2 bg-white border transition ease-in-out rounded-md shadow-sm h-full text-sm' => true, | ||
'active:bg-neutral-100 dark:bg-neutral-800 dark:active:bg-neutral-900' => true, | ||
'border-neutral-200 text-neutral-800 hover:text-neutral-500 focus:border-blue-300 active:text-neutral-800 dark:border-neutral-700 dark:focus:border-blue-600 dark:text-neutral-300 dark:hover:text-white dark:focus:border-blue-600 dark:active:text-white' => ! $this->reordering, | ||
'border-blue-300 text-blue-500 dark:border-blue-600 dark:text-blue-500' => $this->reordering, | ||
]) | ||
title="{{ __('Reordering') }}" | ||
aria-label="{{ __('Reordering') }}" | ||
<x-livewire-table::button | ||
:title="__('Reordering')" | ||
:aria-label="__('Reordering')" | ||
wire:click="$toggle('reordering')" | ||
:active="$this->reordering" | ||
> | ||
<!-- Icon "queue-list" (outline) from https://heroicons.com --> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z" /> | ||
</svg> | ||
</button> | ||
</x-livewire-table::button> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@props(['active' => false]) | ||
|
||
<button | ||
{{ | ||
$attributes->class([ | ||
'flex items-center gap-1 relative px-3 py-2 bg-white border transition ease-in-out rounded-md shadow-sm h-full text-sm' => true, | ||
'active:bg-neutral-100 dark:bg-neutral-800 dark:active:bg-neutral-900' => true, | ||
'border-neutral-200 text-neutral-800 hover:text-neutral-500 focus:border-blue-300 active:text-neutral-800 dark:border-neutral-700 dark:focus:border-blue-600 dark:text-neutral-300 dark:hover:text-white dark:focus:border-blue-600 dark:active:text-white' => ! $active, | ||
'border-blue-300 text-blue-500 dark:border-blue-600 dark:text-blue-500' => $active, | ||
]) | ||
}} | ||
> | ||
{{ $slot }} | ||
@if ($active) | ||
<span class="absolute -right-1 -top-1 rounded-full shadow-sm bg-blue-500 dark:bg-blue-600 block w-2.5 h-2.5"></span> | ||
@endif | ||
</button> |
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