conditionally set dark mode
is it possible to set dark mode based on certain config? I want to disable the theme mode switcher and set the dark mode based on a setting from laravel settings, but I can't figure out how to do it (as the darkMode method do not accept closure)
Solution:Jump to solution
I think you can use something like this to handle it
```php
if ($xx) {
filament()->getPanel('xx')->darkMode(true);...
3 Replies
I've tried RenderHooks to add a JS script and inject the class "dark", but it gets cleared after the page loads
anyone?
maybe a middleware?
Solution
I think you can use something like this to handle it