I’m new to Laravel.
I have the following snippet in my navigation.blade.php:
<div class="space-x-8 text-xl sm:-my-px sm:ml-10 sm:flex">
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')" >
{{ __('Licenses') }}
</x-nav-link>
<!-- some more links -->
</div>
And this snippet is being rendered like this:
<div class="space-x-8 text-xl sm:-my-px sm:ml-10 sm:flex">
<a class="inline-flex
items-center
px-1
pt-1
border-b-2
border-indigo-400
/* issue-> */ text-sm
font-medium
leading-5
text-gray-900
focus:outline-none
focus:border-indigo-700
transition
duration-150
ease-in-out
/* issue-> */ text-base"
href="https://my.domain/licenses">
Licenses
</a>
</div>
I marked the problematic points with /* issue-> */.
I tried looking for the base renderer that convert x-nav-link to an HTML <a href="...">...</a> without success.
Does anyone have any idea how to fix it?
>Solution :
<x-nav-link> points to a Laravel view component, which by default should reside in:
app/View/Components/NavLink.php
it has an associated view file in:
resources/views/components/nav-link.blade.php
Either one of those files contains the logic that adds text-sm and/or text-base classes.