Skip to content

Commit

Permalink
Password: fix usage of Buttons and Icons (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
anfeichtinger authored Oct 2, 2024
1 parent 05e9ab0 commit ed24520
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/View/Components/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ public function render(): View|Closure|string
@if($icon)
<x-mary-icon :name="$icon" class="absolute top-1/2 -translate-y-1/2 start-3 text-gray-400 pointer-events-none" />
@elseif($placeToggleLeft())
<x-button x-on:click="hidden = !hidden" class="btn-ghost btn-sm btn-circle p-0 absolute top-1/2 -translate-y-1/2 start-1.5 text-gray-400 no-animation active:focus:-translate-y-1/2">
<x-icon name="{{ $passwordIcon }}" x-show="hidden" />
<x-icon name="{{ $passwordVisibleIcon }}" x-show="!hidden" x-cloak class="text-primary" />
</x-button>
<x-mary-button x-on:click="hidden = !hidden" class="btn-ghost btn-sm btn-circle p-0 absolute top-1/2 -translate-y-1/2 start-1.5 text-gray-400 no-animation active:focus:-translate-y-1/2">
<x-mary-icon name="{{ $passwordIcon }}" x-show="hidden" />
<x-mary-icon name="{{ $passwordVisibleIcon }}" x-show="!hidden" x-cloak class="text-primary" />
</x-mary-button>
@endif
<!-- CLEAR ICON -->
Expand All @@ -158,10 +158,10 @@ public function render(): View|Closure|string
@if($iconRight)
<x-mary-icon :name="$iconRight" @class(["absolute top-1/2 end-3 -translate-y-1/2 text-gray-400 pointer-events-none", "!end-10" => $clearable]) />
@elseif($placeToggleRight())
<x-button x-on:click="hidden = !hidden" @class(["btn-ghost btn-sm btn-circle p-0 absolute top-1/2 -translate-y-1/2 end-1.5 text-gray-400 no-animation active:focus:-translate-y-1/2", "!end-9" => $clearable])>
<x-icon name="{{ $passwordIcon }}" x-show="hidden" />
<x-icon name="{{ $passwordVisibleIcon }}" x-show="!hidden" x-cloak class="text-primary" />
</x-button>
<x-mary-button x-on:click="hidden = !hidden" @class(["btn-ghost btn-sm btn-circle p-0 absolute top-1/2 -translate-y-1/2 end-1.5 text-gray-400 no-animation active:focus:-translate-y-1/2", "!end-9" => $clearable])>
<x-mary-icon name="{{ $passwordIcon }}" x-show="hidden" />
<x-mary-icon name="{{ $passwordVisibleIcon }}" x-show="!hidden" x-cloak class="text-primary" />
</x-mary-button>
@endif
<!-- INLINE LABEL -->
Expand Down

0 comments on commit ed24520

Please sign in to comment.