generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
327d6c6
commit 4069235
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<x-dynamic-component | ||
:component="$getFieldWrapperView()" | ||
:field="$field" | ||
> | ||
<div x-data="{ state: $wire.entangle('{{ $getStatePath() }}') }"> | ||
<a | ||
class="fi-btn fi-btn-size-md fi-btn-color-primary fi-ac-btn-action bg-custom-600 hover:bg-custom-500 focus:ring-custom-500/50 dark:bg-custom-500 dark:hover:bg-custom-400 dark:focus:ring-custom-400/50 relative inline-grid grid-flow-col items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm font-semibold text-white shadow-sm outline-none transition duration-75 focus:ring-2 disabled:pointer-events-none disabled:opacity-70" | ||
href="{{ $field->getUrl() }}" | ||
style="--c-400:var(--primary-400);--c-500:var(--primary-500);--c-600:var(--primary-600);" | ||
download | ||
> | ||
<span class="fi-btn-label"> | ||
Download | ||
</span> | ||
</a> | ||
</div> | ||
</x-dynamic-component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Kiwilan\Steward\Filament\Components; | ||
|
||
use Filament\Forms\Components\Field; | ||
|
||
class ActionButton extends Field | ||
{ | ||
protected string $view = 'steward::filament.field.action-button'; | ||
|
||
protected string $url; | ||
|
||
public function url(string $url): static | ||
{ | ||
$this->url = $url; | ||
|
||
return $this; | ||
} | ||
|
||
public function getUrl(): string | ||
{ | ||
return $this->url; | ||
} | ||
} |