File tree 2 files changed +24
-51
lines changed
2 files changed +24
-51
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import PropTypes from 'prop-types';
3
3
import classNames from 'classnames' ;
4
4
5
5
const VerticalTimeline = ( {
6
- animate,
7
- className,
8
- layout,
9
- lineColor,
6
+ animate = true ,
7
+ className = '' ,
8
+ layout = '2-columns' ,
9
+ lineColor = '#FFF' ,
10
10
children,
11
11
} ) => {
12
12
if ( typeof window === 'object' ) {
@@ -43,11 +43,4 @@ VerticalTimeline.propTypes = {
43
43
lineColor : PropTypes . string ,
44
44
} ;
45
45
46
- VerticalTimeline . defaultProps = {
47
- animate : true ,
48
- className : '' ,
49
- layout : '2-columns' ,
50
- lineColor : '#FFF' ,
51
- } ;
52
-
53
46
export default VerticalTimeline ;
Original file line number Diff line number Diff line change @@ -4,23 +4,26 @@ import classNames from 'classnames';
4
4
import { InView } from 'react-intersection-observer' ;
5
5
6
6
const VerticalTimelineElement = ( {
7
- children,
8
- className,
9
- contentArrowStyle,
10
- contentStyle,
11
- date,
12
- dateClassName,
13
- icon,
14
- iconClassName,
15
- iconOnClick,
16
- onTimelineElementClick,
17
- iconStyle,
18
- id,
19
- position,
20
- style,
21
- textClassName,
22
- intersectionObserverProps,
23
- visible,
7
+ children = '' ,
8
+ className = '' ,
9
+ contentArrowStyle = null ,
10
+ contentStyle = null ,
11
+ date = '' ,
12
+ dateClassName = '' ,
13
+ icon = null ,
14
+ iconClassName = '' ,
15
+ iconOnClick = null ,
16
+ onTimelineElementClick = null ,
17
+ iconStyle = null ,
18
+ id = '' ,
19
+ position = '' ,
20
+ style = null ,
21
+ textClassName = '' ,
22
+ intersectionObserverProps = {
23
+ rootMargin : '0px 0px -40px 0px' ,
24
+ triggerOnce : true ,
25
+ } ,
26
+ visible = false ,
24
27
} ) => (
25
28
< InView { ...intersectionObserverProps } >
26
29
{ ( { inView, ref } ) => (
@@ -109,27 +112,4 @@ VerticalTimelineElement.propTypes = {
109
112
} ) ,
110
113
} ;
111
114
112
- VerticalTimelineElement . defaultProps = {
113
- children : '' ,
114
- className : '' ,
115
- contentArrowStyle : null ,
116
- contentStyle : null ,
117
- icon : null ,
118
- iconClassName : '' ,
119
- iconOnClick : null ,
120
- onTimelineElementClick : null ,
121
- iconStyle : null ,
122
- id : '' ,
123
- style : null ,
124
- date : '' ,
125
- dateClassName : '' ,
126
- position : '' ,
127
- textClassName : '' ,
128
- visible : false ,
129
- intersectionObserverProps : {
130
- rootMargin : '0px 0px -40px 0px' ,
131
- triggerOnce : true ,
132
- } ,
133
- } ;
134
-
135
115
export default VerticalTimelineElement ;
You can’t perform that action at this time.
0 commit comments