Skip to content

Commit

Permalink
Merge pull request #5 from soWizardly/bugfix/badge-icon-fix
Browse files Browse the repository at this point in the history
HasBadge and heroicon bugfix
  • Loading branch information
atmonshi authored Jan 28, 2024
2 parents 1b6f14a + 8e6d8da commit 7ceb300
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/accordion/item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class="fi-accordion-item-icon h-6 w-6 shrink-0 transition duration-75"
{{ $label }}
</span>
<span :class="{ 'rotate-180': activeAccordion == id }">
@svg('heroicon-c-chevron-down','w-4 h-4 duration-200 ease-out')
@svg('heroicon-m-chevron-down','w-4 h-4 duration-200 ease-out')
</span>
</button>
<div class="p-4" x-show="activeAccordion == id" x-collapse x-cloak>
{{ $slot }}
</div>
</div>
</div>
9 changes: 7 additions & 2 deletions src/Forms/Accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
use Closure;
use Filament\Forms\Components\Component;
use Filament\Forms\Components\Contracts\CanConcealComponents;
use Filament\Support\Concerns\HasBadge;
use Filament\Support\Concerns\HasIcon;
use Illuminate\Support\Str;

class Accordion extends Component implements CanConcealComponents
{
use HasBadge;
use HasIcon;

protected string $view = 'zeus-accordion::forms.accordion';
Expand Down Expand Up @@ -44,4 +42,11 @@ public static function make(string | Closure | null $label = null): static

return $static;
}

public function badge(string | Closure | null $badge): static
{
$this->badge = $badge;

Check failure on line 48 in src/Forms/Accordion.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to an undefined property LaraZeus\Accordion\Forms\Accordion::$badge.

Check failure on line 48 in src/Forms/Accordion.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to an undefined property LaraZeus\Accordion\Forms\Accordion::$badge.

return $this;
}
}

0 comments on commit 7ceb300

Please sign in to comment.