Hi everyone,
I have trouble using astro-icon with a solid-js framework component and named slots. You can find the example on Stackblitz
On a prerendered Page I got the framework component HeaderSolid as client:only to display buttons after a delay of 3 seconds:
<HeaderSolid client:only="solid-js">
<div slot="fallback" class="flex gap-4 justify-start items-center" >
<div class="flex gap-2 justify-center items-center bg-green-600 p-2">
<Icon class="size-6" name="login"/>
<span>Login (Astro)</span>
</div>
<div class="flex gap-2 justify-center items-center bg-green-600 p-2">
<Icon class="size-6" name="register"/>
<span>Register (Astro)</span>
</div>
</div>
<Icon class="size-6" name="login" slot="loginicon"/>
<Icon class="size-6" name="register2" slot="registericon"/>
</HeaderSolid>
I am using the fallback-slot to pass the fallback content and named-slots to pass the icons to the framework components as follows:
So with this code, the login.svg icon will not be displayed properly in the framework component (as it is used in the fallback-slot before), whereas the register2.svg icon will (as it is not being used in the fallback-slot).
Does anyone has a clue what I am doing wrong here?
Cheers,
Aleks