generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #5 from cjmellor/release/v2.0.0
feat: Replace Blade Component with Livewire Component
- Loading branch information
Showing
15 changed files
with
296 additions
and
159 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
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 was deleted.
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,35 @@ | ||
<div class="inline-flex relative gap-1 group"> | ||
@for ($i = 1; $i <= $starRating; $i++) | ||
@php | ||
$width = $this->getStarWidth($i) | ||
@endphp | ||
<div | ||
class="inline-block relative {{ $static ? '' : 'cursor-pointer' }}" | ||
wire:mouseover="{{ $static ? '' : '$set(\'hoverValue\', ' . $i . ')' }}" | ||
wire:mouseout="{{ $static ? '' : '$set(\'hoverValue\', 0)' }}" | ||
wire:click="{{ $static ? '' : 'setRating(' . $i . ')' }}" | ||
> | ||
<!-- Outlined Star --> | ||
<i class="{{ $iconBg }} {{ $iconBgColor }} {{ $size }}"></i> | ||
|
||
<!-- Filled Star --> | ||
<div class="absolute top-0 left-0 whitespace-nowrap overflow-hidden w-[{{ $width }}%]"> | ||
<i class="{{ $iconFg }} {{ $iconFgColor }} {{ $size }}"></i> | ||
</div> | ||
</div> | ||
@endfor | ||
|
||
@if($modelRated) | ||
<div class="ml-6"> | ||
<i class="fas fa-circle-check text-green-500 {{ $size }}"></i> | ||
</div> | ||
@endif | ||
|
||
@if($this->ratingCanBeChanged()) | ||
<div class="ml-6 group-hover:block hidden"> | ||
<a class="cursor-pointer" wire:click="undoRating"> | ||
<i class="fas fa-circle-xmark {{ $size }} text-red-500 hover:text-red-600"></i> | ||
</a> | ||
</div> | ||
@endif | ||
</div> |
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
Oops, something went wrong.