-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTabbedServiceValue.js
53 lines (48 loc) · 1.41 KB
/
TabbedServiceValue.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React from "react";
import { connect, styled, css } from "frontity";
import * as Variables from "../../../styles/Variables";
const TabbedServiceValue = ({ state, isWindowTint, values }) => {
if (!isWindowTint) {
return (
<Div isWindowTint={isWindowTint}>
{state.theme.tabbedServiceInfo.typeButtons.map((isActive, typeIndex) => {
if (isActive) {
return state.theme.tabbedServiceInfo.locationButtons.map(
(isActive, locationIndex) => {
if (isActive) {
return (
<Value key={`value-${typeIndex}-${locationIndex}`}>
<strong>
<em>{values[typeIndex]?.[locationIndex]?.[0]}</em>
</strong>
{values[typeIndex]?.[locationIndex]?.[1]}
</Value>
);
}
}
);
}
})}
</Div>
);
}
return null;
};
export default connect(TabbedServiceValue);
const Div = styled.div`
${(props) =>
props.isWindowTint &&
css`
text-align: center;
margin-bottom: 1rem;
`}
`;
const Value = styled.span`
font-family: trade-gothic-next-compressed, sans-serif;
font-weight: 400;
font-size: 2rem;
text-decoration: underline;
margin-bottom: 1rem;
color: ${Variables.colorBlack};
animation: ${Variables.fadeIn} 1s ease;
`;