Skip to content

Commit

Permalink
Fix bug in login functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Dec 5, 2023
1 parent 327d6c6 commit 4069235
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
17 changes: 17 additions & 0 deletions resources/views/filament/field/action-button.blade.php
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>
24 changes: 24 additions & 0 deletions src/Filament/Components/ActionButton.php
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;
}
}

0 comments on commit 4069235

Please sign in to comment.