@props([ 'name', 'size' => null, 'stroke' => null, 'title' => null, ]) @php $path = \Kview\UiCore\IconRegistry::resolve((string) $name); $sizeValue = is_numeric($size) ? $size.'px' : ($size ?: '1em'); $strokeValue = $stroke ?: '1.75'; @endphp class('kv-icon')->merge([ 'viewBox' => '0 0 24 24', 'width' => $sizeValue, 'height' => $sizeValue, 'fill' => 'none', 'stroke' => 'currentColor', 'stroke-width' => $strokeValue, 'stroke-linecap' => 'round', 'stroke-linejoin' => 'round', 'aria-hidden' => $title ? null : 'true', 'role' => $title ? 'img' : null, 'style' => '--kv-icon-size: '.$sizeValue, ]) }} > @if ($title) {{ $title }} @endif {!! $path !!}