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
f9eeb41
commit 6a14e77
Showing
4 changed files
with
44 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,31 @@ | ||
<?php | ||
|
||
namespace Foxws\WireUse\Support\Html\Mixins; | ||
|
||
use Livewire\Form; | ||
use Spatie\Html\Elements\Div; | ||
|
||
class HtmlExtendedMixin | ||
{ | ||
protected ?Form $form = null; | ||
|
||
public function wireForm(): mixed | ||
{ | ||
return function (?Form $value = null): static | ||
{ | ||
$this->form = $value; | ||
|
||
return $this; | ||
}; | ||
} | ||
|
||
public function icon(): mixed | ||
{ | ||
return function (string $name, ?string $class = null, ?array $attributes = []): Div | ||
{ | ||
/** @var Div $this */ | ||
|
||
return $this->div(svg($name, $class, $attributes)); | ||
Check failure on line 28 in src/Support/Html/Mixins/HtmlExtendedMixin.php GitHub Actions / phpstan
|
||
}; | ||
} | ||
} |
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