Skip to content

Commit

Permalink
Add error handling for missing blade-ui-kit/blade-icons dependency in…
Browse files Browse the repository at this point in the history
… Icon class
  • Loading branch information
francoism90 committed Nov 27, 2024
1 parent 693058b commit 0fd961e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Support/Html/Elements/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Icon extends BaseElement

public function svg(?string $name = null, ?string $class = null, ?array $attributes = []): static
{
throw_if(! function_exists('svg'), 'Make sure blade-ui-kit/blade-icons is installed');

return $this->html(svg($name, $class, $attributes)->toHtml());
}
}

0 comments on commit 0fd961e

Please sign in to comment.