Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using svelte component for event displaying #244

Open
wwmike opened this issue Feb 25, 2024 · 2 comments
Open

Using svelte component for event displaying #244

wwmike opened this issue Feb 25, 2024 · 2 comments

Comments

@wwmike
Copy link

wwmike commented Feb 25, 2024

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

@vkurko
Copy link
Owner

vkurko commented Feb 26, 2024

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.

@wwmike
Copy link
Author

wwmike commented Feb 26, 2024

Sounds great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants