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
435 stars 123 forks source link

Proper way to style the table? #118

Closed ghost closed 1 year ago

ghost commented 1 year ago

What's the proper way to style the default Table component of this package ?

Currently the table looks like a mess in my project, because of the random styling. Like it's all over the place.

For example

Inactive search

Inactive search

Active search

Active search Why aren't they always aligned on one side?

I want to remove the padding from the TableWrapper component as well.

<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
    <div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
    ...
    </div>
</div>

What would be the best way to achieve this working with the template/slots rather than cloning all the components?

ghost commented 1 year ago

I decided to clone the entire Table component files to my project to modify it to my needs, too many things seemed weirdly styled to I made it my own as a base table.