F
Filament15mo ago
Ehsan

Disabling dark mode for form component

I have created a custom form component and embedded the component on a page. I have also disabled darkMode for the panel using panel configuration ->darkMode(false) which has disabled the same on admin panel. But the form component added to a view is displayed in darkMode. I tried to disable the same using Javascript, but it doesn't work.
localStorage.theme = 'light';
document.documentElement.classList.remove('dark')
localStorage.theme = 'light';
document.documentElement.classList.remove('dark')
The form is basically using OS default theme instead, which in my case is dark. I also tried with darkMode: 'class' in tailwind.config.js I am following this example https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component Any help rendered will be appreciated.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server