In my Card component, I have a link property so that the entire card is hyperlinked.
But in some cases, I don’t want the card to be linked.
Even if I don’t set a link on the instance of a component, it still renders as an <a>
and not a <div>
Can I do something to get around this?
nadim
2
Hi @grantambrose,
Here is one way you can you do it:
- Create a new component property of type “Visibility”. Set it to Hidden by default.
- Remove the link from “card” div.
- Create a new child div, call it “link”
- Link the link property of the newly created div with the component’s link property.
- Link the visibility property of the newly created div wit the components visibility property.
- Set the position of the newly created div to absolute, top 0, and right 0.
- Set the width and height of the new created div to 100%.
- Set the position of the “card” div to relative.
Now for Card components that have a link, set their visibility to Visible and set the corresponding link.
Below are a few screenshots. Hope this helps!
2 Likes
thank you for that detailed reply.
I think adding an element with positioning and a visibility toggle might be how I end up doing it.
That is, if there isn’t an easier way using the Cwicly UI