Using svelte component for event displaying
wwmike opened this issue · 2 comments
Hello!
I am trying to display events with profile pictures, and I was wondering if there's a way to use a svelte component.
Right now I solved it by setting a function for eventContent
option, which returns a manually constructed html, but this duplicates all the code I already have in a <ProfilePicture {name} {pictureUrl} />
component.
Is there a better way of doing it I am not aware of? ( If I'm right, svelte slots are not utilized in the component )
EDIT:
A bit better way I came up was having ProfilePicture.render({name:'$name',pictureUrl:'$pictureUrl'})
on the backend and pass it to the frontend, where I replace $name and $pictureUrl for the appropriate events, but having a default picture for empty pictureUrl is still an externalized logic.
Thank you,
Mihaly
Hello,
Unfortunately, the calendar does not currently support any slots. I agree that such a feature would be very useful for a Svelte project. Therefore, in future versions I will try to solve this issue.
Sounds great, thank you!