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

feat: bind event item to timeline custom connector slot #2770

Merged
merged 1 commit into from
Jul 13, 2022
Merged

feat: bind event item to timeline custom connector slot #2770

merged 1 commit into from
Jul 13, 2022

Conversation

robbienohra
Copy link
Contributor

@robbienohra robbienohra commented Jul 13, 2022

Currently, style overrides to the timeline connector component happen globally at the timeline component level. It is not an uncommon use case to require dynamic style overrides across multiple connectors for a given timeline instance. This can be achieved (as is being done with the marker and content named slot) by binding the item property to the connector named slot. This enables the following type of customization to connectors for a given timeline.

<template #connector="slotProps">
            <div
              class="p-timeline-event-connector"
              :style="{ width: '4px', backgroundColor: slotProps.item.color }"
            ></div>
</template>

image

Unless there is a strong reason to not support this (can't see what that reason would be) I think this would be a really useful addition to the component!

@robbienohra robbienohra changed the title chore: bind item to timeline custom connector slot feat: bind item to timeline custom connector slot Jul 13, 2022
@robbienohra robbienohra changed the title feat: bind item to timeline custom connector slot feat: bind event item to timeline custom connector slot Jul 13, 2022
@robbienohra
Copy link
Contributor Author

Created an issue here to follow the recommended repo process.

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

Successfully merging this pull request may close these issues.

2 participants