livewire / flux

The official Livewire UI component library
342 stars 31 forks source link

[navbar - header] can't inject @asset() into logo="" #152

Open helderneves91 opened 1 day ago

helderneves91 commented 1 day ago

Hello, I'm using the layout provided in the docs, header version.

Take this line of code: <flux:brand href="#" logo="https://fluxui.dev/img/demo/logo.png" name="Acme Inc." class="max-lg:hidden dark:hidden" />

In logo="", if I replace it with <flux:brand href="#" logo="{{ asset("app_assets/logos/logo1.png") }}" name="{{ config('app.name') }}" class="max-lg:hidden dark:hidden" />, the navbar becomes white, basically all items disappear.

But if I hard-code the link, it works as expected.

Captura de ecrã 2024-09-27, às 18 38 21
idealerror commented 1 day ago

Use :logo="" instead of logo=""

helderneves91 commented 1 day ago

Use :logo="" instead of logo=""

Hi, doesn't work.

idealerror commented 1 day ago

That's not a very helpful response. What didn't work?

<flux:brand href="#" :logo="asset('app_assets/logos/logo1.png')" :name="config('app.name')" textSize="text-xl" class="px-2 dark:hidden" />
helderneves91 commented 1 day ago

That's not a very helpful response. What didn't work?

<flux:brand href="#" :logo="asset('app_assets/logos/logo1.png')" :name="config('app.name')" textSize="text-xl" class="px-2 dark:hidden" />

Was using {{ }} , :logo="asset('app_assets/logos/logo1.png')" works as expected. Just mailed this to the support, since it's not documented.

Thanks @idealerror 🫡