@php
$textClass = $headerClass ? 'text-white' : 'text-black';
@endphp


<table {{ $attributes->merge(['class' => "table ".$tableClass ]) }}>
    <thead {{ $attributes->merge(['class' => $headerClass]) }}>
        @foreach($headers as $header)
        <th class="{{ $textClass }} {{ $header['align'] }}">{{ $header['name'] }}</th>
        @endforeach
    </thead>
    <tbody>
        {{ $slot }}
    </tbody>
</table>