protonemedia / inertiajs-tables-laravel-query-builder

Inertia.js Tables for Laravel Query Builder
https://protone.media/en/blog/introducing-inertiajs-tables-a-datatables-like-package-for-laravel-query-builder
MIT License
437 stars 130 forks source link

Tailwind 3 support #57

Closed mgralikowski closed 2 years ago

mgralikowski commented 2 years ago

Hi,

I am trying to use this library in Laravel Jetsream with Inertia JS. The issue is that Jetsream comes with 3.x version, Your tables use the previous one - 2.0.

image

Is it possible to use this library 3.x? Only by creating a custom component?

mgralikowski commented 2 years ago

Hm... Interesting but...

I started creating my own component to try to rewrite it to 3.x, so I started by copying vue components from the package to the project files: \resources\js\Tables\Tailwind3

and suddenly tables looks pretty good:

image

Tailwind config content:

const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
    content: [
        './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
        './vendor/laravel/jetstream/**/*.blade.php',
        './storage/framework/views/*.php',
        './resources/views/**/*.blade.php',
        './resources/js/**/*.vue',
    ],
    theme: {
        extend: {
            fontFamily: {
                sans: ['Nunito', ...defaultTheme.fontFamily.sans],
            },
        },
    },
    plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
};

so './resources/js/**/*.vue', do the job and TW 2.x is pretty compatible with 3.x.

Of course adding './node_modules/@protonemedia/inertiajs-tables-laravel-query-builder/**/*.vue', now, works as well.

mrhoseah commented 2 years ago

Copy the components and modify, it works,.

pascalbaljet commented 2 years ago

Fixed in v2