@hedia/recommendation-screen 2.1.50 → 2.1.51-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/Header.js +24 -30
- package/package.json +1 -1
|
@@ -11,65 +11,59 @@ export default class Header extends React.Component {
|
|
|
11
11
|
/** JSX element to display the cancel button and header. When the cancel button in the header is tabbed, the exitCallback prop callback function should be called. */
|
|
12
12
|
render() {
|
|
13
13
|
return (<React.Fragment>
|
|
14
|
-
<SafeAreaView style={headerStyles.
|
|
15
|
-
<View style={headerStyles.headerContainer}>
|
|
14
|
+
<SafeAreaView style={headerStyles.headerContainer}>
|
|
16
15
|
<View style={headerStyles.margin}>
|
|
17
16
|
<View style={headerStyles.exitButtonContainer}>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
</TouchableOpacity>
|
|
22
|
-
<View style={headerStyles.headerFiller}/>
|
|
23
|
-
</View>
|
|
17
|
+
<TouchableOpacity onPress={this.props.exitCallback} testID={Testing.Id.HeaderTestIds.ExitCalculation}>
|
|
18
|
+
<Icon iconIdentifier={`Ionicons/ios-close-circle-outline`} style={headerStyles.icon}/>
|
|
19
|
+
</TouchableOpacity>
|
|
24
20
|
</View>
|
|
25
21
|
<View style={headerStyles.headerTextContainer}>
|
|
26
|
-
<TextBold style={headerStyles.headerText}
|
|
22
|
+
<TextBold style={headerStyles.headerText}>
|
|
27
23
|
{i18n._(t `INSULIN${`\n`}RECOMMENDATION`)}
|
|
28
24
|
</TextBold>
|
|
29
25
|
</View>
|
|
30
|
-
<View style={headerStyles.
|
|
26
|
+
<View style={headerStyles.headerSettingsFiller}/>
|
|
31
27
|
</View>
|
|
32
|
-
</
|
|
28
|
+
</SafeAreaView>
|
|
33
29
|
</React.Fragment>);
|
|
34
30
|
}
|
|
35
31
|
}
|
|
32
|
+
const { width } = Dimensions.get(`window`);
|
|
36
33
|
const headerStyles = StyleSheet.create({
|
|
37
|
-
backgroundColour: {
|
|
38
|
-
backgroundColor: colors.darkBlue,
|
|
39
|
-
},
|
|
40
34
|
margin: {
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
marginHorizontal: `2%`,
|
|
36
|
+
marginTop: `3%`,
|
|
43
37
|
flexDirection: `row`,
|
|
44
38
|
flex: 1,
|
|
45
39
|
},
|
|
46
40
|
headerContainer: {
|
|
47
41
|
flexDirection: `row`,
|
|
48
|
-
|
|
42
|
+
marginVertical: `2%`,
|
|
49
43
|
},
|
|
50
44
|
exitButtonContainer: {
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
maxWidth: `11.5%`,
|
|
46
|
+
minWidth: `11.5%`,
|
|
53
47
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
fontSize: Dimensions.get(`screen`).width / 12,
|
|
59
|
-
color: colors.mistBlue,
|
|
48
|
+
icon: {
|
|
49
|
+
fontSize: width / 12,
|
|
50
|
+
color: colors.fadeBlue,
|
|
51
|
+
alignSelf: `center`,
|
|
60
52
|
},
|
|
61
53
|
headerTextContainer: {
|
|
62
54
|
flex: 6,
|
|
63
|
-
justifyContent: `
|
|
55
|
+
justifyContent: `flex-start`,
|
|
64
56
|
alignItems: `center`,
|
|
65
|
-
|
|
57
|
+
maxWidth: `77%`,
|
|
66
58
|
},
|
|
67
59
|
headerText: {
|
|
68
|
-
fontSize:
|
|
60
|
+
fontSize: width / 20,
|
|
69
61
|
textAlign: `center`,
|
|
70
62
|
color: colors.white,
|
|
71
63
|
},
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
headerSettingsFiller: {
|
|
65
|
+
flexDirection: `column`,
|
|
66
|
+
maxWidth: `11.5%`,
|
|
67
|
+
minWidth: `11.5%`,
|
|
74
68
|
},
|
|
75
69
|
});
|