@@ -16,7 +16,7 @@ import '../style.css';
16
16
// Add your documentation imports here. These are available to
17
17
// React specimen. Do NOT pass React here as Catalog does that.
18
18
const documentationImports = { } ;
19
- const timelineElements = [
19
+ const timelineElements = params => [
20
20
< VerticalTimelineElement
21
21
onTimelineElementClick = { ( ) => {
22
22
// eslint-disable-next-line no-alert
@@ -28,6 +28,7 @@ const timelineElements = [
28
28
date = "2011 - present"
29
29
iconStyle = { { background : 'rgb(33, 150, 243)' , color : '#fff' } }
30
30
icon = { < WorkIcon /> }
31
+ { ...params }
31
32
>
32
33
< h3 className = "vertical-timeline-element-title" > Creative Director</ h3 >
33
34
< h4 className = "vertical-timeline-element-subtitle" > Miami, FL</ h4 >
@@ -41,6 +42,7 @@ const timelineElements = [
41
42
date = "2010 - 2011"
42
43
iconStyle = { { background : 'rgb(33, 150, 243)' , color : '#fff' } }
43
44
icon = { < WorkIcon /> }
45
+ { ...params }
44
46
>
45
47
< h3 className = "vertical-timeline-element-title" > Art Director</ h3 >
46
48
< h4 className = "vertical-timeline-element-subtitle" > San Francisco, CA</ h4 >
@@ -53,6 +55,7 @@ const timelineElements = [
53
55
date = "2008 - 2010"
54
56
iconStyle = { { background : 'rgb(33, 150, 243)' , color : '#fff' } }
55
57
icon = { < WorkIcon /> }
58
+ { ...params }
56
59
>
57
60
< h3 className = "vertical-timeline-element-title" > Web Designer</ h3 >
58
61
< h4 className = "vertical-timeline-element-subtitle" > Los Angeles, CA</ h4 >
@@ -63,6 +66,7 @@ const timelineElements = [
63
66
date = "2006 - 2008"
64
67
iconStyle = { { background : 'rgb(33, 150, 243)' , color : '#fff' } }
65
68
icon = { < WorkIcon /> }
69
+ { ...params }
66
70
>
67
71
< h3 className = "vertical-timeline-element-title" > Web Designer</ h3 >
68
72
< h4 className = "vertical-timeline-element-subtitle" > San Francisco, CA</ h4 >
@@ -75,6 +79,7 @@ const timelineElements = [
75
79
date = "April 2013"
76
80
iconStyle = { { background : 'rgb(233, 30, 99)' , color : '#fff' } }
77
81
icon = { < SchoolIcon /> }
82
+ { ...params }
78
83
>
79
84
< h3 className = "vertical-timeline-element-title" >
80
85
Content Marketing for Web, Mobile and Social Media
@@ -87,6 +92,7 @@ const timelineElements = [
87
92
date = "November 2012"
88
93
iconStyle = { { background : 'rgb(233, 30, 99)' , color : '#fff' } }
89
94
icon = { < SchoolIcon /> }
95
+ { ...params }
90
96
>
91
97
< h3 className = "vertical-timeline-element-title" >
92
98
Agile Development Scrum Master
@@ -99,6 +105,7 @@ const timelineElements = [
99
105
date = "2002 - 2006"
100
106
iconStyle = { { background : 'rgb(233, 30, 99)' , color : '#fff' } }
101
107
icon = { < SchoolIcon /> }
108
+ { ...params }
102
109
>
103
110
< h3 className = "vertical-timeline-element-title" >
104
111
Bachelor of Science in Interactive Digital Media Visual Imaging
@@ -109,6 +116,7 @@ const timelineElements = [
109
116
< VerticalTimelineElement
110
117
iconStyle = { { background : 'rgb(16, 204, 82)' , color : '#fff' } }
111
118
icon = { < StarIcon /> }
119
+ { ...params }
112
120
/> ,
113
121
] ;
114
122
@@ -333,13 +341,15 @@ const pages = [
333
341
{
334
342
path : '/demo' ,
335
343
title : 'Demo' ,
336
- content : ( ) => < VerticalTimeline > { timelineElements } </ VerticalTimeline > ,
344
+ content : ( ) => < VerticalTimeline > { timelineElements ( ) } </ VerticalTimeline > ,
337
345
} ,
338
346
{
339
347
path : '/demo-single-column-left' ,
340
348
title : 'Demo single column left' ,
341
349
content : ( ) => (
342
- < VerticalTimeline layout = "1-column" > { timelineElements } </ VerticalTimeline >
350
+ < VerticalTimeline layout = "1-column" >
351
+ { timelineElements ( ) }
352
+ </ VerticalTimeline >
343
353
) ,
344
354
} ,
345
355
{
@@ -368,7 +378,21 @@ const pages = [
368
378
title : 'Demo custom line color' ,
369
379
content : ( ) => (
370
380
< VerticalTimeline className = "vertical-timeline-custom-line" >
371
- { timelineElements }
381
+ { timelineElements ( ) }
382
+ </ VerticalTimeline >
383
+ ) ,
384
+ } ,
385
+ {
386
+ path : '/demo-effect' ,
387
+ title : 'Demo effect trigger multiple times' ,
388
+ content : ( ) => (
389
+ < VerticalTimeline className = "vertical-timeline-custom-line" >
390
+ { timelineElements ( {
391
+ intersectionObserverProps : {
392
+ rootMargin : '0px 0px -40px 0px' ,
393
+ triggerOnce : false ,
394
+ } ,
395
+ } ) }
372
396
</ VerticalTimeline >
373
397
) ,
374
398
} ,
0 commit comments