{{--
? To set:
* required: name as string name or path starts img/svg -> without file extension
optional: type as string file extension without dot (defaults to 'svg')
array option: width as int size
alt as string alt attribute
class as string class attribute
attr as string default attribute
title as string html for tooltips
filePath as string path if is not svg/...
? To implement in Blade:
* @includeIf('layouts.components.icon', [ 'name' => 'svg/example', 'width' => '30', 'type' => 'png' ])
* @icon([ 'name' => 'svg/example', 'width' => '30', 'type' => 'fa' ])
--}}
@if (isset($name))
{{-- @example:
@icon([ 'name' => 'fa-solid fa-arrow-right', 'type' => 'fa' ])
--}}
@if (!empty($type) && $type === 'fa')
@else
@php
$type = !empty($type) ? $type : 'svg'; // Default to 'svg' if not specified
$filePath = !empty($filePath) ? $filePath."/" : "svg/";
$file = "img/" .$filePath .$name .".$type"; // The $name variable will include the path
@endphp
@endif
@endif
{{-- OLD Version
? To set:
* required: name as string name or path starts img/svg -> without extension .svg
array option: width as int size
alt as string alt attribute
class as string class attribute
attr as string default attribute
title as string html for tooltips
? To implement in Blade:
* @includeIf('layouts.components.icon', [ 'name' => 'example', 'width' => '30', ])
--}}
{{--
@if (isset($name))
@endif
--}}