Skip to content

Commit

Permalink
Custom notification badge create
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed May 18, 2024
1 parent a079cf8 commit e6aad5b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
5 changes: 3 additions & 2 deletions app/Livewire/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace App\Livewire;

use Illuminate\View\View;
use Livewire\Component;

class Messages extends Component
{
public function render()
public function render(): View
{
return view('livewire.messages');
return view('messages');
}
}
5 changes: 3 additions & 2 deletions app/Livewire/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace App\Livewire;

use Illuminate\View\View;
use Livewire\Component;

class Orders extends Component
{
public function render()
public function render(): View
{
return view('livewire.orders');
return view('orders');
}
}
2 changes: 1 addition & 1 deletion resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ input:-webkit-autofill {
}

.custom-badge{
@apply absolute -top-0 -right-0 h-[12px] w-[12px] bg-red-500 text-white text-[9px] font-bold rounded-full flex items-center justify-center;
@apply absolute top-1 right-1 h-[6px] w-[6px] bg-blue-500 text-white text-[9px] font-bold rounded-full flex items-center justify-center ring ring-white;
}
5 changes: 2 additions & 3 deletions resources/views/layouts/navigation.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
</div>
</div>
<div class="navbar-end text-black/80 items-center">
<div class="btn btn-circle btn-sm btn-ghost relative center">
<div class="btn btn-circle bg-gray-100 btn-sm btn-ghost relative center">
<i class="fas fa-envelope"></i>
<span class="custom-badge">
3
</span>
</div>
<div class="btn btn-circle btn-sm btn-ghost relative ml-2 center">
<div class="btn btn-circle bg-gray-100 btn-sm btn-ghost relative ml-2 center">
<i class="fas fa-bell-slash"></i>
<!-- <i class="fas fa-bell"></i> -->
<!-- <span class="custom-badge"> auth->notifications->unread() </span> -->
Expand Down
3 changes: 0 additions & 3 deletions resources/views/livewire/dashboard.blade.php

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit e6aad5b

Please sign in to comment.