diff --git a/api-generator/components/timeline.js b/api-generator/components/timeline.js index 843d0f5f5..3443c78a6 100644 --- a/api-generator/components/timeline.js +++ b/api-generator/components/timeline.js @@ -37,6 +37,10 @@ const TimelineSlots = [ { name: "content", description: "Custom content" + }, + { + name: "connector", + description: "Connector element" } ]; diff --git a/src/components/timeline/Timeline.d.ts b/src/components/timeline/Timeline.d.ts index 8d1a0c9e8..c76e133c0 100644 --- a/src/components/timeline/Timeline.d.ts +++ b/src/components/timeline/Timeline.d.ts @@ -13,6 +13,7 @@ declare class Timeline { content: VNode[]; opposite: VNode[]; marker: VNode[]; + connector: VNode[]; } } diff --git a/src/components/timeline/Timeline.vue b/src/components/timeline/Timeline.vue index 25a183684..a534daec9 100644 --- a/src/components/timeline/Timeline.vue +++ b/src/components/timeline/Timeline.vue @@ -8,7 +8,9 @@
-
+ +
+
diff --git a/src/views/timeline/TimelineDoc.vue b/src/views/timeline/TimelineDoc.vue index 9b723ba56..62ec0b167 100644 --- a/src/views/timeline/TimelineDoc.vue +++ b/src/views/timeline/TimelineDoc.vue @@ -110,6 +110,21 @@ export default { </template> </Timeline> + + +
Custom Connectors
+

Connector is an element that binds two events together, use the connector slot to use your own element instead of the default one. If you just require to customize simple properties like the + color and width, apply the "p-timeline-event-connector" class to your element to use the built-in positioning.

+

 
Properties
@@ -164,18 +179,23 @@ export default { opposite - item: Position of the component
- index: Index of the item + item: Position of the event
+ index: Index of the event marker - item: Custom marker of the component
- index: Index of the item + item: Custom marker of the event
+ index: Index of the event content - item: Content of the component
- index: Index of the item + item: Content of the event
+ index: Index of the event + + + connector + item: Content of the event
+ index: Index of the event