diff --git a/resources/views/components/inline-filters.blade.php b/resources/views/components/inline-filters.blade.php index 7da2e777..e3b8c5a4 100644 --- a/resources/views/components/inline-filters.blade.php +++ b/resources/views/components/inline-filters.blade.php @@ -40,9 +40,13 @@ class="{{ $tdClasses }}" $filterClass = str(data_get($column, 'filters.className')); @endphp data_get($column, 'hidden') === true, + data_get($theme, 'table.tdBodyStyle'), + data_get($theme, 'table.tdFiltersStyle') + ]) >
@if ($filterClass->contains('FilterMultiSelect')) diff --git a/resources/views/components/table/th-empty.blade.php b/resources/views/components/table/th-empty.blade.php index 53a8bbd1..e18b571c 100644 --- a/resources/views/components/table/th-empty.blade.php +++ b/resources/views/components/table/th-empty.blade.php @@ -5,7 +5,7 @@ class="{{ data_get($theme, 'table.trBodyClass') }}" {!! $this->processNoDataLabel() !!} diff --git a/src/PowerGridComponent.php b/src/PowerGridComponent.php index b6fda408..b3a577ef 100644 --- a/src/PowerGridComponent.php +++ b/src/PowerGridComponent.php @@ -188,6 +188,13 @@ private function getTheme(): array { $class = $this->template() ?? powerGridTheme(); + if (app()->hasDebugModeEnabled()) { + /** @var ThemeBase $themeBase */ + $themeBase = PowerGrid::theme($class); + + return convertObjectsToArray((array) $themeBase->apply()); + } + return Cache::rememberForever('powerGridTheme_' . $class, function () use ($class) { /** @var ThemeBase $themeBase */ $themeBase = PowerGrid::theme($class); diff --git a/src/Themes/Tailwind.php b/src/Themes/Tailwind.php index 9db0d71e..386bed9e 100644 --- a/src/Themes/Tailwind.php +++ b/src/Themes/Tailwind.php @@ -33,10 +33,10 @@ public function table(): Table ->th('font-extrabold px-2 pr-4 py-3 text-left text-xs text-pg-primary-700 tracking-wider whitespace-nowrap dark:text-pg-primary-300') ->tbody('text-pg-primary-800') ->trBody('border-b border-pg-primary-100 dark:border-pg-primary-600 hover:bg-pg-primary-50 dark:bg-pg-primary-800 dark:hover:bg-pg-primary-700') - ->tdBody('px-3 py-2 whitespace-nowrap dark:text-pg-primary-200') - ->tdBodyEmpty('px-3 py-2 whitespace-nowrap dark:text-pg-primary-200') + ->tdBody('p-2 whitespace-nowrap dark:text-pg-primary-200') + ->tdBodyEmpty('p-2 whitespace-nowrap dark:text-pg-primary-200') ->trBodyClassTotalColumns('') - ->tdBodyTotalColumns('px-3 py-2 whitespace-nowrap dark:text-pg-primary-200 text-sm text-pg-primary-600 text-right space-y-2'); + ->tdBodyTotalColumns('p-2 whitespace-nowrap dark:text-pg-primary-200 text-sm text-pg-primary-600 text-right space-y-2'); } public function footer(): Footer