adriaroable
adriaroable
NNuxt
Created by adriaroable on 2/24/2024 in #❓・help
Multipurpose button
I feel like this is a defineProps error, previously in Nuxt 2 with default: null it would not render the 'to' or 'href' if it was empty. But maybe now it does and thats whats giving the console warning? Idk maybe I'm just saying stupid things but cant make it work hahaha.
10 replies
NNuxt
Created by adriaroable on 2/24/2024 in #❓・help
Multipurpose button
So like this? :is="to || href ? nuxtLink : 'button'" I believe something might not be right because I get the console warning that both 'to' and 'href' cannot be used together.
10 replies
NNuxt
Created by adriaroable on 2/24/2024 in #❓・help
Multipurpose button
Yep, did not know that. Still finding new things every day. Thank you again!
10 replies
NNuxt
Created by adriaroable on 2/24/2024 in #❓・help
Multipurpose button
Thank you for finding the source! Here it is if someone wants it: https://nuxt.com/docs/guide/directory-structure/components#dynamic-components Also, I needed to resolveComponent on the script setup on top, if i did it directly in the :is="to ? resolveComponent('nuxt-link') : href ? 'a' : 'button'" was not working for me.
10 replies