table header bg color

When create a table in Livewire component, and display it as {{ $this->table }}, how do i change table header background color? Currently is set to some shade of gray when i display it, and cant find the way to change it to other color.
Solution:
Just wrap your table with a css class or id then?
Jump to solution
5 Replies
Vladimir
Vladimir7mo ago
ok so the only way i found this to work is to manually add styles in blade file. Is there a better way?
awcodes
awcodes7mo ago
The better way is to use css.
Vladimir
Vladimir7mo ago
@awcodes is this what you mean?
<section class="flex flex-col">
<div class="relative overflow-x-auto rounded-lg w-full">
{{ $this->table }}
</div>
</section>
@push('styles')
<style>
.fi-ta-table > thead {
background-color: #15803d;
}
.fi-ta-header-cell-label {
color:white;
}
.fi-ta-header-cell-sort-icon {
color:white;
}
.fi-ta-ctn{
background: transparent;
}
</style>
@endpush
<section class="flex flex-col">
<div class="relative overflow-x-auto rounded-lg w-full">
{{ $this->table }}
</div>
</section>
@push('styles')
<style>
.fi-ta-table > thead {
background-color: #15803d;
}
.fi-ta-header-cell-label {
color:white;
}
.fi-ta-header-cell-sort-icon {
color:white;
}
.fi-ta-ctn{
background: transparent;
}
</style>
@endpush
If so , here is a challenge i am strugling to solve: Example: I have a same table that looks pretty much same, except that colors in tables are different. There is table showing jobs, and another showing applicants, and by design, first one is in green shades, and second one in orange shades. On the page, i shall display them both, so when i apply css on one, as in example, it overwrite another one. Is there a way to give ID to a table using Table Builder> Or the class?
Solution
Dennis Koch
Dennis Koch6mo ago
Just wrap your table with a css class or id then?
Want results from more Discord servers?
Add your server
More Posts
How to Create an Action class that can be used on both Table and FormHi, I have a pretty big action with form and form handling logic. I need to extract it to a class wPage with 3 forms, problem with selectDataHey, I create my first custom page in filament and now I have issue My issue is: After I pick data Is it possible configure repeater client base?Is it possible to configure a repeater so that instead of making requests at each step, it consolidaDependant select with BelongsToMany relationHi, im my app i have a dependant select with belongsTo that works fine i'm trying to recreate the saAdd auth()->user() to shouldRegisterNavigation()How to use auth()->user() function or access authenticated user through shouldRegisterNavigation() fClose or refresh parent modalI have Relation Manager, in relation manager i have edit action, and in edit modal i have field withLivewire component with custom, dynamic form, struggling with select default valuesI have this in my livewire component: ``` public function form(Form $form): Form { Trigger RelationManager `EditAction` from Infolist Section `headerActions`Hi, I would like to trigger the `EditAction` of a row in a RelationManager from an Inflost Section Best way to handle DeleteAction integrity constraint violationsHi all I've got a model with a restrictOnDelete relationship, so when I click the DeleteAction I geGetting data whilst model loadingHey, I want to process an API call when a user tries to view the single entity in a model. This is t