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

Timeline: new item and index slot props for connector slot #2771

Closed
robbienohra opened this issue Jul 13, 2022 · 1 comment
Closed

Timeline: new item and index slot props for connector slot #2771

robbienohra opened this issue Jul 13, 2022 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@robbienohra
Copy link
Contributor

Describe the feature you would like to see added

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.

Is your feature request related to a problem?

NA

Describe the solution you'd like

Dynamic styling 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

Describe alternatives you have considered

No response

Additional context

No response

@robbienohra robbienohra added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jul 13, 2022
@tugcekucukoglu tugcekucukoglu changed the title Component: Timeline Timeline: new item and index slot props for connector slot Jul 13, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.15.1 milestone Jul 13, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jul 13, 2022
@tugcekucukoglu
Copy link
Member

Fixed via #2770

tugcekucukoglu added a commit that referenced this issue Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants