Created
October 25, 2023 05:28
-
-
Save B-Carcamo/832cdafa6cd8788f9d53bfbb7a47bff0 to your computer and use it in GitHub Desktop.
Change logo from dark to light in filament v3
This file contains hidden or 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
<?php | |
//add darkModeBrandLogo() method to AdminPanelProvider.php file | |
use Filament\Panel; | |
public function panel(Panel $panel): Panel | |
{ | |
return $panel | |
// ... | |
->darkModeBrandLogo(fn () => view('filament.logo.dark')) | |
->brandLogo(fn () => view('filament.logo.light')) | |
->brandLogoHeight('2rem'); | |
} |
This file contains hidden or 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
/*import the images to the public folder, which is located in the resources folder in laravel. | |
Add this line to the resources/js/app.js file*/ | |
import './bootstrap'; | |
import.meta.glob([ | |
'../images/**', | |
'../fonts/**', | |
]); |
This file contains hidden or 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
<--!resources/views/filament/dark.blade.php --> | |
<img | |
src="{{ Vite::asset('resources/images/logoDark.png') }}" | |
alt="Logo Dark" | |
class="h-10" | |
/> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment