Skip to content

Commit 97d5a09

Browse files
committed
Fixes for #4697
1 parent 58e2623 commit 97d5a09

File tree

3 files changed

+122
-8
lines changed

3 files changed

+122
-8
lines changed

src/shared/components/Contentful/Tabs/Tabs.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import zurichTheme from './themes/zurich.scss';
2222
import tabsGroup from './themes/tabsGroup.scss';
2323
import tabsGroupChildren from './themes/tabsGroupChildren.scss';
2424
import underlineTheme from './themes/underline.scss';
25+
import underlineDarkTheme from './themes/underline-dark.scss';
2526
import verticalTheme from './themes/vertical.scss';
2627
import pillsTheme from './themes/pills.scss';
2728

@@ -31,6 +32,7 @@ export const TAB_THEMES = {
3132
'Tabs Group': tabsGroup,
3233
'Tabs Group Children': tabsGroupChildren,
3334
Underline: underlineTheme,
35+
'Underline dark': underlineDarkTheme,
3436
Vertical: verticalTheme,
3537
Pills: pillsTheme,
3638
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
@import "~styles/mixins";
2+
3+
$container-background-gray: #ebebeb;
4+
$text-color-black: #262628;
5+
$text-color-gray: #888894;
6+
$text-color-pannel: #4a4a4a;
7+
8+
.container {
9+
@include roboto-regular;
10+
11+
max-width: $screen-md;
12+
margin: auto;
13+
}
14+
15+
.tablist {
16+
@include roboto-regular;
17+
18+
display: -webkit-flex; /* Safari */
19+
display: flex;
20+
-webkit-flex-direction: row; /* Safari */
21+
flex-direction: row;
22+
-webkit-justify-content: center; /* Safari */
23+
justify-content: center;
24+
list-style-type: none;
25+
border-bottom: 5px solid #fff;
26+
27+
@include xs-to-sm {
28+
overflow-x: auto;
29+
white-space: nowrap;
30+
border: none;
31+
margin-left: 16px;
32+
}
33+
34+
@media (max-width: 425px) {
35+
justify-content: space-between;
36+
}
37+
}
38+
39+
.tab {
40+
text-align: center;
41+
margin: 0 25px;
42+
color: #fff;
43+
font-size: 20px;
44+
font-weight: 400;
45+
line-height: 25px;
46+
padding-bottom: 15px;
47+
cursor: pointer;
48+
margin-bottom: -5px;
49+
position: relative;
50+
51+
@include xs-to-sm {
52+
margin: 0;
53+
padding-right: 36px;
54+
border-bottom: 5px solid #fff;
55+
}
56+
57+
&:hover,
58+
&.selected {
59+
&::after {
60+
content: '';
61+
border-radius: 1000vw;
62+
background: #43d7b0;
63+
height: 5px;
64+
width: 100%;
65+
position: absolute;
66+
bottom: 0;
67+
left: 0;
68+
69+
@include xs-to-sm {
70+
width: calc(100% - 36px);
71+
bottom: -5px;
72+
}
73+
}
74+
}
75+
76+
p {
77+
small {
78+
color: #888894;
79+
font-size: 13px;
80+
font-weight: 400;
81+
line-height: 25px;
82+
text-align: left;
83+
}
84+
85+
strong {
86+
font-weight: bold;
87+
}
88+
}
89+
}
90+
91+
.tabpannel {
92+
display: none;
93+
}
94+
95+
.selectedTabPanel {
96+
display: block;
97+
98+
@include xs-to-sm {
99+
padding: 0 15px;
100+
}
101+
}

src/shared/components/Contentful/Tabs/themes/underline.scss

+19-8
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ $text-color-pannel: #4a4a4a;
2828
overflow-x: auto;
2929
white-space: nowrap;
3030
border: none;
31+
margin-left: 16px;
32+
}
33+
34+
@media (max-width: 425px) {
3135
justify-content: space-between;
32-
margin: 0 16px;
3336
}
3437
}
3538

3639
.tab {
3740
text-align: center;
3841
margin: 0 25px;
39-
color: $text-color-black;
42+
color: #2a2a2a;
4043
font-size: 20px;
4144
font-weight: 400;
4245
line-height: 25px;
@@ -47,24 +50,28 @@ $text-color-pannel: #4a4a4a;
4750

4851
@include xs-to-sm {
4952
margin: 0;
50-
margin-right: 36px;
51-
52-
&:last-child {
53-
margin-right: 0;
54-
}
53+
padding-right: 36px;
54+
border-bottom: 5px solid #e9e9e9;
5555
}
5656

5757
&:hover,
5858
&.selected {
5959
&::after {
6060
content: '';
61-
border-radius: 2.5px;
61+
border-radius: 1000vw;
6262
background: #43d7b0;
6363
height: 5px;
6464
width: 100%;
6565
position: absolute;
6666
bottom: 0;
6767
left: 0;
68+
border-left: 1px solid #fff;
69+
border-right: 1px solid #fff;
70+
71+
@include xs-to-sm {
72+
width: calc(100% - 36px);
73+
bottom: -5px;
74+
}
6875
}
6976
}
7077

@@ -89,4 +96,8 @@ $text-color-pannel: #4a4a4a;
8996

9097
.selectedTabPanel {
9198
display: block;
99+
100+
@include xs-to-sm {
101+
padding: 0 15px;
102+
}
92103
}

0 commit comments

Comments
 (0)