Hi team! I created a Component that represents a blog entry. Such component contains - for instance - an image element: an avatar with a radius of 60px (i.e. the face of who wrote the blog entry). Now, each blog entry may be created by a different person, so to enable that I turned the image component associated with the avatar into a “slot”. The issue now though is that if I change something in the avatar style (e.g. set the radius to 70px), that won’t be propagated to all the blog entries, because of it being a slot. If I don’t turn the avatar element into a slot, then all the blog entries end up sharing the same image. Could you please suggest the proper way of implementing this?
Hi, it’s a bit buried, but you can actually right-click and expose an image as a prop, rather than a slot.
We’re hoping to unify this + slots in the future, but for now, let me know if that unblocks you
Interesting. I can’t find that functionality when right-clicking an image…
What else can we expose as props in studio? Is there an article in the docs?
Sorry, I should have said, right-clicking on the image thumbnail in the right sidebar:
@yang I thought that making those fields a prop would have worked only when in combination with some custom code in the application? i.e. I recall reading somewhere in the docs that props can’t be inputed via the UI
@notable_penguin Ah that may be referring to meta props, which cannot be inputted via the UI, but normal props can!