MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

Dark mode #416

Open dimdam opened 2 years ago

dimdam commented 2 years ago

Is it possible to enable dark mode?

NikarashiHatsu commented 2 years ago

Yes, it is possible to enable dark mode. But within the package itself, natively, it is not possible. You have to at least publish the configuration file and edit the config/livewire-datatables.php.

If you somehow used the DaisyUI as your TailwindCSS plugin, you can add these classes I used:

'default_classes' => [
    'row' => [
        'even' => 'divide-x divide-base-300 text-sm text-base-content bg-base-200',
        'odd' => 'divide-x divide-base-300 text-sm text-base-content bg-base-100',
        'selected' => 'divide-x divide-base-300 text-sm text-base-content bg-yellow-100',
    ],
    'cell' => 'text-sm text-base-content',
],