@@ -12,36 +12,49 @@ const OverflowWrapper = styled.div`
1212 overflow: auto;
1313` ;
1414
15- const Container = styled . div ( props => {
16- const defaults = {
17- display : ' flex' ,
18- flexDirection : ' column' ,
19- position : 'relative' ,
15+ const Container = styled . div `
16+ position: relative;
17+ display: flex;
18+ flex-direction: column;
19+ line-height: normal;
2020
21- '*, *:before, *:after' : {
22- boxSizing : 'border-box' ,
23- } ,
24-
25- // renders the vertical line
26- '::after' : { ...props . theme . timelineTrack } ,
21+ *,
22+ *:before,
23+ *:after {
24+ box-sizing: border-box;
25+ }
2726
28- [ `&. ${ LAYOUTS . INLINE_EVENTS } ` ] : {
29- '::after' : { left : '130px' } ,
30- } ,
27+ font-size: ${ props => props . theme . timeline . fontSize } ;
28+ font-family: ${ props => props . theme . timeline . fontFamily } ;
29+ background-color: ${ props => props . theme . timeline . backgroundColor } ;
3130
32- [ `&.${ LAYOUTS . INLINE_EVENTS_INLINE_DATE } ` ] : {
33- '::after' : { left : '29px' } ,
34- } ,
31+ ::after {
32+ position: absolute;
33+ left: ${ props => props . theme . timelineTrack . left } ;
34+ width: ${ props => props . theme . timelineTrack . width } ;
35+ height: ${ props => props . theme . timelineTrack . height } ;
36+ background-color: ${ props => props . theme . timelineTrack . backgroundColor } ;
37+ content: ${ props => props . theme . timelineTrack . content } ;
38+ }
3539
36- '@media (max-width: 768px)' : {
37- '::after' : { left : '29px !important' } ,
38- } ,
39- } ;
40+ &.${ LAYOUTS . INLINE_EVENTS } {
41+ ::after {
42+ left: 130px;
43+ }
44+ }
4045
41- const style = { ...defaults , ...props . theme . timeline } ;
46+ &.${ LAYOUTS . INLINE_EVENTS_INLINE_DATE } {
47+ ::after {
48+ left: 29px;
49+ }
50+ }
4251
43- return style ;
44- } ) ;
52+ @media (max-width: 768px) {
53+ ::after {
54+ left: 29px !important;
55+ }
56+ }
57+ ` ;
4558
4659const _opts = {
4760 layout : LAYOUTS . ALTERNATE_EVENTS , // see LAYOUTS constant
0 commit comments