File tree 5 files changed +59
-6
lines changed
src/shared/components/Contentful/Tabs
5 files changed +59
-6
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ workflows:
342
342
filters :
343
343
branches :
344
344
only :
345
- - develop
345
+ - free
346
346
# This is alternate dev env for parallel testing
347
347
- " build-test " :
348
348
context : org-global
@@ -363,7 +363,7 @@ workflows:
363
363
filters :
364
364
branches :
365
365
only :
366
- - thrive-spooky1-p0-2
366
+ - free
367
367
# This is stage env for production QA releases
368
368
- " build-prod-staging " :
369
369
context : org-global
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ export default class TabsItemsLoader extends Component {
87
87
theme,
88
88
tabId,
89
89
themeName,
90
+ forceRenderTabPanel,
90
91
} = this . props ;
91
92
const { tabIndex, mobileTabsShow } = this . state ;
92
93
@@ -102,7 +103,7 @@ export default class TabsItemsLoader extends Component {
102
103
selectedIndex = { tabIndex }
103
104
selectedTabClassName = { theme . selected }
104
105
onSelect = { tIndx => this . setState ( { tabIndex : tIndx , mobileTabsShow : false } ) }
105
- forceRenderTabPanel
106
+ forceRenderTabPanel = { forceRenderTabPanel }
106
107
>
107
108
< div className = { theme . tabListWrap } >
108
109
{
@@ -230,6 +231,7 @@ TabsItemsLoader.defaultProps = {
230
231
selected : 0 ,
231
232
spaceName : null ,
232
233
environment : null ,
234
+ forceRenderTabPanel : true ,
233
235
} ;
234
236
235
237
TabsItemsLoader . propTypes = {
@@ -241,4 +243,5 @@ TabsItemsLoader.propTypes = {
241
243
theme : PT . shape ( ) . isRequired ,
242
244
tabId : PT . string . isRequired ,
243
245
themeName : PT . string . isRequired ,
246
+ forceRenderTabPanel : PT . bool ,
244
247
} ;
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ function ContentfulTabs(props) {
36
36
theme = { TAB_THEMES [ fields . theme || 'Default' ] }
37
37
tabId = { fields . urlQueryName || id }
38
38
themeName = { fields . theme }
39
+ forceRenderTabPanel = { fields . forceRenderTabPanel }
39
40
/>
40
41
) ;
41
42
} }
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ $text-color-black: #262628;
22
22
border-bottom : none ;
23
23
24
24
@include xs-to-sm {
25
- -webkit-flex-direction : column ; /* Safari */
26
- flex-direction : column ;
25
+ overflow : auto ;
27
26
align-items : center ;
27
+ justify-content : flex-start ;
28
28
}
29
29
}
30
30
@@ -38,9 +38,11 @@ $text-color-black: #262628;
38
38
cursor : pointer ;
39
39
border-radius : 15px ;
40
40
padding : 0 15px ;
41
+ white-space : nowrap ;
41
42
42
43
@include xs-to-sm {
43
44
margin : 2px ;
45
+ padding : 0 25px ;
44
46
}
45
47
46
48
& :hover {
Original file line number Diff line number Diff line change
1
+ /* stylelint-disable no-descending-specificity */
1
2
@import ' ~styles/mixins' ;
2
3
3
4
$text-color-black : #262628 ;
@@ -11,6 +12,10 @@ $gray-border-color: #e9e9e9;
11
12
display : flex ;
12
13
max-width : $screen-lg ;
13
14
margin : auto ;
15
+
16
+ @media (max-width : 768px ) {
17
+ flex-direction : column ;
18
+ }
14
19
}
15
20
16
21
.tablist {
@@ -24,9 +29,18 @@ $gray-border-color: #e9e9e9;
24
29
border-right : 5px solid $gray-border-color ;
25
30
margin-right : 58px ;
26
31
padding : 7px 0 ;
32
+
33
+ @media (max-width : 768px ) {
34
+ flex-direction : row ;
35
+ border-right : none ;
36
+ margin-right : 0 ;
37
+ margin-bottom : 15px ;
38
+ overflow : auto ;
39
+ padding : 0 ;
40
+ }
27
41
}
28
42
29
- .tab {
43
+ li .tab {
30
44
text-align : left ;
31
45
color : $text-color-black ;
32
46
font-size : 16px ;
@@ -35,6 +49,16 @@ $gray-border-color: #e9e9e9;
35
49
cursor : pointer ;
36
50
padding-right : 30px ;
37
51
52
+ @media (max-width : 768px ) {
53
+ padding-right : 20px ;
54
+ border-bottom : 5px solid $gray-border-color ;
55
+ min-width : auto !important ;
56
+
57
+ & :first-child {
58
+ padding-left : 7px ;
59
+ }
60
+ }
61
+
38
62
& :hover ,
39
63
& .selected {
40
64
font-weight : 700 ;
@@ -52,6 +76,29 @@ $gray-border-color: #e9e9e9;
52
76
border-radius : 5px ;
53
77
border-top : 1px solid white ;
54
78
border-bottom : 1px solid white ;
79
+
80
+ @media (max-width : 768px ) {
81
+ display : none ;
82
+ }
83
+ }
84
+
85
+ p {
86
+ position : relative ;
87
+ display : inline-block ;
88
+
89
+ & ::after {
90
+ @media (max-width : 768px ) {
91
+ content : ' ' ;
92
+ background : $selected-color ;
93
+ height : 5px ;
94
+ width : 100% ;
95
+ display : flex ;
96
+ position : absolute ;
97
+ border-radius : 15% ;
98
+ border-left : 2px solid white ;
99
+ border-right : 2px solid white ;
100
+ }
101
+ }
55
102
}
56
103
}
57
104
You can’t perform that action at this time.
0 commit comments