diff --git a/src/Support/Html/Elements/Icon.php b/src/Support/Html/Elements/Icon.php
new file mode 100644
index 0000000..577eff6
--- /dev/null
+++ b/src/Support/Html/Elements/Icon.php
@@ -0,0 +1,15 @@
+html(svg($name, $class));
+ }
+}
diff --git a/src/Support/Html/Mixins/HtmlExtendedMixin.php b/src/Support/Html/Mixins/HtmlExtendedMixin.php
index fe6fae9..1d5db0d 100644
--- a/src/Support/Html/Mixins/HtmlExtendedMixin.php
+++ b/src/Support/Html/Mixins/HtmlExtendedMixin.php
@@ -2,6 +2,7 @@
namespace Foxws\WireUse\Support\Html\Mixins;
+use Foxws\WireUse\Support\Html\Elements\Icon;
use Livewire\Form;
use Spatie\Html\Elements\Div;
@@ -11,19 +12,19 @@ class HtmlExtendedMixin
public function wireForm(): mixed
{
- return function (?Form $value = null): static {
+ return function (?Form $value = null): static
+ {
$this->form = $value;
return $this;
};
}
- public function icon(): mixed
+ public function icon()
{
- return function (string $name, ?string $class = null, ?array $attributes = []): Div {
- /** @var Div $this */
-
- return $this->div(svg($name, $class, $attributes));
+ return function (): Icon
+ {
+ return Icon::create();
};
}
}