From ceddbc0e833755d82a18517bb30efe20d31ca753 Mon Sep 17 00:00:00 2001 From: juliangums Date: Wed, 26 Jun 2024 21:29:51 +0000 Subject: [PATCH] chore: fix code style --- .../resources/views/chart-widget.blade.php | 168 +++++++++--------- .../widgets/src/Concerns/HasEmptyState.php | 6 +- 2 files changed, 86 insertions(+), 88 deletions(-) diff --git a/packages/widgets/resources/views/chart-widget.blade.php b/packages/widgets/resources/views/chart-widget.blade.php index a37b52e740f..faa91833b2e 100644 --- a/packages/widgets/resources/views/chart-widget.blade.php +++ b/packages/widgets/resources/views/chart-widget.blade.php @@ -36,96 +36,94 @@ class="w-max sm:-my-2" wire:poll.{{ $pollingInterval }}="updateChartData" @endif > - - @if ($empty) - @if ($emptyState = $this->getEmptyState()) - {{ $emptyState }} - @else -
- -
- @endif - @else -
null, - default => 'fi-color-custom', - }, - is_string($color) ? "fi-color-{$color}" : null, - ]) - > - getMaxHeight()) - style="max-height: {{ $maxHeight }}" + @if ($empty) + @if ($emptyState = $this->getEmptyState()) + {{ $emptyState }} + @else +
+ +
@endif - >
+ @else +
null, + default => 'fi-color-custom', + }, + is_string($color) ? "fi-color-{$color}" : null, + ]) + > + getMaxHeight()) + style="max-height: {{ $maxHeight }}" + @endif + > - 'text-gray-100 dark:text-gray-800', - default => 'text-custom-50 dark:text-custom-400/10', - }, - ]) - @style([ - \Filament\Support\get_color_css_variables( - $color, - shades: [50, 400], - alias: 'widgets::chart-widget.background', - ) => $color !== 'gray', - ]) - > + 'text-gray-100 dark:text-gray-800', + default => 'text-custom-50 dark:text-custom-400/10', + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $color, + shades: [50, 400], + alias: 'widgets::chart-widget.background', + ) => $color !== 'gray', + ]) + > - 'text-gray-400', - default => 'text-custom-500 dark:text-custom-400', - }, - ]) - @style([ - \Filament\Support\get_color_css_variables( - $color, - shades: [400, 500], - alias: 'widgets::chart-widget.border', - ) => $color !== 'gray', - ]) - > + 'text-gray-400', + default => 'text-custom-500 dark:text-custom-400', + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 500], + alias: 'widgets::chart-widget.border', + ) => $color !== 'gray', + ]) + > - - - -
- @endif + + +
+ @endif diff --git a/packages/widgets/src/Concerns/HasEmptyState.php b/packages/widgets/src/Concerns/HasEmptyState.php index a5b70e9973a..635fbb6500a 100644 --- a/packages/widgets/src/Concerns/HasEmptyState.php +++ b/packages/widgets/src/Concerns/HasEmptyState.php @@ -2,13 +2,13 @@ namespace Filament\Widgets\Concerns; -use Filament\Support\Concerns\EvaluatesClosures; -use Filament\Support\Facades\FilamentIcon; +use Closure; use Filament\Actions\Action; use Filament\Actions\ActionGroup; +use Filament\Support\Concerns\EvaluatesClosures; +use Filament\Support\Facades\FilamentIcon; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\View\View; -use Closure; trait HasEmptyState {