@hedia/recommendation-screen 2.1.52 → 2.1.53-alpha.1
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/RecommendationScreen.d.ts +3 -0
- package/dist/src/RecommendationScreen.js +39 -33
- package/dist/src/assets/IconsSVG/Close.d.ts +4 -0
- package/dist/src/assets/IconsSVG/Close.js +6 -0
- package/dist/src/assets/IconsSVG/Edit.d.ts +4 -0
- package/dist/src/assets/IconsSVG/Edit.js +7 -0
- package/dist/src/assets/IconsSVG/activity/Cycling.d.ts +4 -0
- package/dist/src/assets/IconsSVG/activity/Cycling.js +11 -0
- package/dist/src/assets/IconsSVG/activity/Running.d.ts +4 -0
- package/dist/src/assets/IconsSVG/activity/Running.js +9 -0
- package/dist/src/assets/IconsSVG/activity/Stretching.d.ts +4 -0
- package/dist/src/assets/IconsSVG/activity/Stretching.js +9 -0
- package/dist/src/assets/IconsSVG/activity/Swimming.d.ts +4 -0
- package/dist/src/assets/IconsSVG/activity/Swimming.js +12 -0
- package/dist/src/assets/IconsSVG/activity/Walking.d.ts +4 -0
- package/dist/src/assets/IconsSVG/activity/Walking.js +10 -0
- package/dist/src/assets/assets/IconsSVG/Close.tsx +13 -0
- package/dist/src/assets/assets/IconsSVG/Edit.tsx +16 -0
- package/dist/src/assets/assets/IconsSVG/activity/Cycling.tsx +40 -0
- package/dist/src/assets/assets/IconsSVG/activity/Running.tsx +28 -0
- package/dist/src/assets/assets/IconsSVG/activity/Stretching.tsx +28 -0
- package/dist/src/assets/assets/IconsSVG/activity/Swimming.tsx +46 -0
- package/dist/src/assets/assets/IconsSVG/activity/Walking.tsx +34 -0
- package/dist/src/components/ExitModal.d.ts +22 -0
- package/dist/src/components/ExitModal.js +89 -0
- package/dist/src/components/InfoBars.d.ts +4 -26
- package/dist/src/components/InfoBars.js +23 -53
- package/dist/src/components/LimitationMessage.js +6 -12
- package/dist/src/components/LineSeparator.d.ts +5 -1
- package/dist/src/components/LineSeparator.js +1 -3
- package/dist/src/components/RecentInsulin.d.ts +2 -1
- package/dist/src/components/RecentInsulin.js +38 -38
- package/dist/src/components/RecommendationModal.d.ts +24 -59
- package/dist/src/components/RecommendationModal.js +58 -95
- package/dist/src/components/RecommendedCarbs.js +67 -78
- package/dist/src/components/RecommendedInsulin.js +37 -59
- package/dist/src/components/Remeasure.js +28 -46
- package/dist/src/components/TimeoutModal.d.ts +20 -0
- package/dist/src/components/TimeoutModal.js +82 -0
- package/dist/src/components/TransferToLogbook.js +13 -12
- package/dist/src/components/activity/Activity.js +36 -40
- package/dist/src/components/activity/ActivityIcon.d.ts +7 -7
- package/dist/src/components/activity/ActivityIcon.js +30 -22
- package/dist/src/components/activity/ActivityIntensity.js +10 -17
- package/dist/src/components/mood/Emotion.js +6 -8
- package/dist/src/components/mood/MoodIcon.js +3 -9
- package/dist/src/components/styles/fonts.d.ts +9 -1
- package/dist/src/components/styles/fonts.js +8 -0
- package/dist/src/locale/da/messages.js +1 -1
- package/dist/src/locale/da/messages.po +2 -2
- package/dist/src/locale/de/messages.js +1 -1
- package/dist/src/locale/de/messages.po +2 -2
- package/dist/src/locale/en/messages.js +1 -1
- package/dist/src/locale/en/messages.po +2 -2
- package/dist/src/locale/es/messages.js +1 -1
- package/dist/src/locale/es/messages.po +2 -2
- package/dist/src/locale/fr/messages.js +1 -1
- package/dist/src/locale/fr/messages.po +2 -2
- package/dist/src/locale/it/messages.js +1 -1
- package/dist/src/locale/it/messages.po +2 -2
- package/dist/src/types/enum.d.ts +7 -2
- package/dist/src/types/enum.js +12 -6
- package/dist/src/utils/Constants.d.ts +1 -0
- package/dist/src/utils/Constants.js +1 -0
- package/package.json +2 -2
- package/dist/src/assets/activity/Cyclist.png +0 -0
- package/dist/src/assets/activity/Other.png +0 -0
- package/dist/src/assets/activity/Runner.png +0 -0
- package/dist/src/assets/activity/Swimmer.png +0 -0
- package/dist/src/assets/activity/Walk.png +0 -0
- package/dist/src/components/Header.d.ts +0 -10
- package/dist/src/components/Header.js +0 -76
- package/dist/src/components/Icon.d.ts +0 -20
- package/dist/src/components/Icon.js +0 -43
- package/dist/src/components/TwoOptionModal.d.ts +0 -147
- package/dist/src/components/TwoOptionModal.js +0 -140
- /package/dist/src/assets/{mood → assets/mood}/happy.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/happy_active.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/neutral.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/neutral_active.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/sad.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/sad_active.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/semi_happy.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/semi_happy_active.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/semi_sad.png +0 -0
- /package/dist/src/assets/{mood → assets/mood}/semi_sad_active.png +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StatusBar, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
3
|
+
import Close from "../assets/IconsSVG/Close";
|
|
4
|
+
import { Testing } from "../types/enum";
|
|
5
|
+
import { colors } from "../utils/Constants";
|
|
6
|
+
import { FONTS } from "./styles/fonts";
|
|
7
|
+
import Text from "./Text";
|
|
8
|
+
const { ExitModalTestIds: TwoOptionModalTestIds } = Testing.Id;
|
|
9
|
+
/** Display a modal with two buttons for the user to choose between. */
|
|
10
|
+
export default class ExitModal extends React.Component {
|
|
11
|
+
/** Compose a JSX element for displaying the modal. */
|
|
12
|
+
render() {
|
|
13
|
+
return (<View style={style.container}>
|
|
14
|
+
<StatusBar backgroundColor={colors.transparentLightBlue}/>
|
|
15
|
+
<View style={style.modalContainer}>
|
|
16
|
+
<TouchableOpacity onPress={this.props.onClose} testID={TwoOptionModalTestIds.ExitButton} style={style.iconWrapper}>
|
|
17
|
+
{Close({ color: colors.white, style: style.icon })}
|
|
18
|
+
</TouchableOpacity>
|
|
19
|
+
<View style={style.textContainer}>
|
|
20
|
+
<Text style={style.titleRowLayout}>{this.props.title}</Text>
|
|
21
|
+
<Text style={style.message}>{this.props.message}</Text>
|
|
22
|
+
</View>
|
|
23
|
+
<View style={style.buttonContainer}>
|
|
24
|
+
<TouchableOpacity testID={TwoOptionModalTestIds.FirstOption} onPress={this.props.firstOption} style={[style.button, { marginBottom: 16 }]}>
|
|
25
|
+
<Text style={style.textButton}>{this.props.textFirstOption}</Text>
|
|
26
|
+
</TouchableOpacity>
|
|
27
|
+
<TouchableOpacity testID={TwoOptionModalTestIds.SecondOption} onPress={this.props.secondOption} style={style.button}>
|
|
28
|
+
<Text style={style.textButton}>{this.props.textSecondOption}</Text>
|
|
29
|
+
</TouchableOpacity>
|
|
30
|
+
</View>
|
|
31
|
+
</View>
|
|
32
|
+
</View>);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
const style = StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
...StyleSheet.absoluteFillObject,
|
|
39
|
+
justifyContent: `center`,
|
|
40
|
+
backgroundColor: colors.transparentBlack,
|
|
41
|
+
},
|
|
42
|
+
modalContainer: {
|
|
43
|
+
margin: 16,
|
|
44
|
+
padding: 24,
|
|
45
|
+
borderRadius: 24,
|
|
46
|
+
backgroundColor: colors.darkBlue,
|
|
47
|
+
},
|
|
48
|
+
iconWrapper: {
|
|
49
|
+
position: `absolute`,
|
|
50
|
+
zIndex: 1,
|
|
51
|
+
left: 24,
|
|
52
|
+
top: 28,
|
|
53
|
+
},
|
|
54
|
+
icon: {
|
|
55
|
+
height: 20,
|
|
56
|
+
width: 20,
|
|
57
|
+
},
|
|
58
|
+
textContainer: {
|
|
59
|
+
marginBottom: 24,
|
|
60
|
+
},
|
|
61
|
+
titleRowLayout: {
|
|
62
|
+
...FONTS.Poppins.bold_XL,
|
|
63
|
+
color: colors.white,
|
|
64
|
+
textAlign: `center`,
|
|
65
|
+
paddingHorizontal: 46,
|
|
66
|
+
marginBottom: 24,
|
|
67
|
+
},
|
|
68
|
+
message: {
|
|
69
|
+
...FONTS.Poppins.regular_Base,
|
|
70
|
+
color: colors.dustyBlue,
|
|
71
|
+
textAlign: `center`,
|
|
72
|
+
},
|
|
73
|
+
buttonContainer: {
|
|
74
|
+
flexDirection: `column`,
|
|
75
|
+
justifyContent: `space-around`,
|
|
76
|
+
},
|
|
77
|
+
button: {
|
|
78
|
+
borderRadius: 50,
|
|
79
|
+
borderWidth: 1,
|
|
80
|
+
borderColor: colors.teal,
|
|
81
|
+
},
|
|
82
|
+
textButton: {
|
|
83
|
+
...FONTS.Poppins.bold_LG,
|
|
84
|
+
textAlign: `center`,
|
|
85
|
+
color: colors.teal,
|
|
86
|
+
paddingHorizontal: 16,
|
|
87
|
+
paddingVertical: 12,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
@@ -47,27 +47,15 @@ export default class InfoBars extends React.Component<IProps> {
|
|
|
47
47
|
export declare const infoStyles: {
|
|
48
48
|
container: {
|
|
49
49
|
flex: number;
|
|
50
|
-
|
|
51
|
-
margin: {
|
|
52
|
-
flex: number;
|
|
53
|
-
margin: string;
|
|
50
|
+
flexDirection: "row";
|
|
54
51
|
marginBottom: number;
|
|
55
|
-
|
|
56
|
-
border: {
|
|
52
|
+
padding: number;
|
|
57
53
|
borderWidth: number;
|
|
58
54
|
borderColor: string;
|
|
59
55
|
borderRadius: number;
|
|
60
|
-
paddingVertical: string;
|
|
61
|
-
};
|
|
62
|
-
borderContainer: {
|
|
63
|
-
flex: number;
|
|
64
|
-
flexDirection: "row";
|
|
65
|
-
justifyContent: "space-between";
|
|
66
|
-
paddingHorizontal: string;
|
|
67
56
|
};
|
|
68
57
|
labelContainer: {
|
|
69
58
|
flex: number;
|
|
70
|
-
justifyContent: "center";
|
|
71
59
|
};
|
|
72
60
|
label: {
|
|
73
61
|
color: string;
|
|
@@ -78,28 +66,18 @@ export declare const infoStyles: {
|
|
|
78
66
|
valueUnitContainer: {
|
|
79
67
|
flex: number;
|
|
80
68
|
justifyContent: "flex-end";
|
|
69
|
+
alignItems: "center";
|
|
81
70
|
flexDirection: "row";
|
|
82
71
|
};
|
|
83
|
-
valueContainer: {
|
|
84
|
-
flex: number;
|
|
85
|
-
justifyContent: "flex-end";
|
|
86
|
-
};
|
|
87
72
|
value: {
|
|
88
73
|
color: string;
|
|
89
|
-
textAlign: "right";
|
|
90
74
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
91
75
|
fontSize: number;
|
|
92
76
|
lineHeight: number;
|
|
93
77
|
};
|
|
94
|
-
unitContainer: {
|
|
95
|
-
flex: number;
|
|
96
|
-
justifyContent: "flex-end";
|
|
97
|
-
paddingBottom: string;
|
|
98
|
-
};
|
|
99
78
|
units: {
|
|
100
79
|
color: string;
|
|
101
|
-
|
|
102
|
-
paddingLeft: string;
|
|
80
|
+
paddingLeft: number;
|
|
103
81
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
104
82
|
fontSize: number;
|
|
105
83
|
lineHeight: number;
|
|
@@ -46,81 +46,51 @@ export default class InfoBars extends React.Component {
|
|
|
46
46
|
render() {
|
|
47
47
|
const { testID } = this.props;
|
|
48
48
|
return (<View style={infoStyles.container}>
|
|
49
|
-
<View style={infoStyles.
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</Text>
|
|
60
|
-
</View>
|
|
61
|
-
<View style={infoStyles.unitContainer}>
|
|
62
|
-
<Text style={infoStyles.units} testID={testID?.unitID}>
|
|
63
|
-
{this.displayUnit()}
|
|
64
|
-
</Text>
|
|
65
|
-
</View>
|
|
66
|
-
</View>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
49
|
+
<View style={infoStyles.labelContainer}>
|
|
50
|
+
<Text style={infoStyles.label}>{this.props.label}</Text>
|
|
51
|
+
</View>
|
|
52
|
+
<View style={infoStyles.valueUnitContainer}>
|
|
53
|
+
<Text style={infoStyles.value} testID={testID?.valueID}>
|
|
54
|
+
{this.displayValue()}
|
|
55
|
+
</Text>
|
|
56
|
+
<Text style={{ ...infoStyles.units, paddingLeft: this.props.unit === null ? 0 : 4 }} testID={testID?.unitID}>
|
|
57
|
+
{this.displayUnit()}
|
|
58
|
+
</Text>
|
|
69
59
|
</View>
|
|
70
60
|
</View>);
|
|
71
61
|
}
|
|
72
62
|
}
|
|
73
63
|
/** @internal */
|
|
74
64
|
export const infoStyles = StyleSheet.create({
|
|
75
|
-
container: {
|
|
76
|
-
margin: {
|
|
77
|
-
flex: 1,
|
|
78
|
-
margin: `3%`,
|
|
79
|
-
marginBottom: 0,
|
|
80
|
-
},
|
|
81
|
-
border: {
|
|
82
|
-
borderWidth: 2,
|
|
83
|
-
borderColor: colors.mistBlue,
|
|
84
|
-
borderRadius: 5,
|
|
85
|
-
paddingVertical: `1%`,
|
|
86
|
-
},
|
|
87
|
-
borderContainer: {
|
|
65
|
+
container: {
|
|
88
66
|
flex: 1,
|
|
89
67
|
flexDirection: `row`,
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
marginBottom: 8,
|
|
69
|
+
padding: 16,
|
|
70
|
+
borderWidth: 1,
|
|
71
|
+
borderColor: colors.dustyDarkBlue,
|
|
72
|
+
borderRadius: 5,
|
|
92
73
|
},
|
|
93
74
|
labelContainer: {
|
|
94
75
|
flex: 7,
|
|
95
|
-
justifyContent: `center`,
|
|
96
76
|
},
|
|
97
77
|
label: {
|
|
98
|
-
...FONTS.Poppins.
|
|
78
|
+
...FONTS.Poppins.regular_Base,
|
|
99
79
|
color: colors.white,
|
|
100
80
|
},
|
|
101
81
|
valueUnitContainer: {
|
|
102
82
|
flex: 6.5,
|
|
103
83
|
justifyContent: `flex-end`,
|
|
84
|
+
alignItems: `center`,
|
|
104
85
|
flexDirection: `row`,
|
|
105
86
|
},
|
|
106
|
-
valueContainer: {
|
|
107
|
-
flex: 5,
|
|
108
|
-
justifyContent: `flex-end`,
|
|
109
|
-
},
|
|
110
87
|
value: {
|
|
111
|
-
...FONTS.Poppins.
|
|
112
|
-
color: colors.
|
|
113
|
-
textAlign: `right`,
|
|
114
|
-
},
|
|
115
|
-
unitContainer: {
|
|
116
|
-
flex: 3,
|
|
117
|
-
justifyContent: `flex-end`,
|
|
118
|
-
paddingBottom: `1%`,
|
|
88
|
+
...FONTS.Poppins.regular_LG,
|
|
89
|
+
color: colors.lightBlue,
|
|
119
90
|
},
|
|
120
91
|
units: {
|
|
121
|
-
...FONTS.Poppins.
|
|
122
|
-
color: colors.
|
|
123
|
-
|
|
124
|
-
paddingLeft: `10%`,
|
|
92
|
+
...FONTS.Poppins.regular_XS,
|
|
93
|
+
color: colors.lightBlue,
|
|
94
|
+
paddingLeft: 4,
|
|
125
95
|
},
|
|
126
96
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t } from "@lingui/macro";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { TouchableOpacity
|
|
3
|
+
import { TouchableOpacity } from "react-native";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
6
|
import { stylesModal } from "./RecommendationModal";
|
|
@@ -13,17 +13,11 @@ export default class LimitationMessage extends React.Component {
|
|
|
13
13
|
render = () => {
|
|
14
14
|
const { limitationMessage } = this.props;
|
|
15
15
|
return (<React.Fragment>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</
|
|
20
|
-
|
|
21
|
-
</View>
|
|
22
|
-
<View style={stylesModal.containerAcceptButton}>
|
|
23
|
-
<TouchableOpacity testID={Testing.Id.LimitationMessageTestIds.OkButton} style={stylesModal.okButton} onPress={this.props.onPressNextButton}>
|
|
24
|
-
<Text style={stylesModal.buttonText}>{i18n._(t `OK`)}</Text>
|
|
25
|
-
</TouchableOpacity>
|
|
26
|
-
</View>
|
|
16
|
+
<Text style={stylesModal.textTittleMessage}>{i18n._(t `Attention`)}</Text>
|
|
17
|
+
<Text style={stylesModal.textMessage}>{limitationMessage}</Text>
|
|
18
|
+
<TouchableOpacity testID={Testing.Id.LimitationMessageTestIds.OkButton} style={stylesModal.okButton} onPress={this.props.onPressNextButton}>
|
|
19
|
+
<Text style={stylesModal.buttonText}>{i18n._(t `OK`)}</Text>
|
|
20
|
+
</TouchableOpacity>
|
|
27
21
|
</React.Fragment>);
|
|
28
22
|
};
|
|
29
23
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface IProps {
|
|
3
3
|
/** The color that the line should have. */
|
|
4
|
-
|
|
4
|
+
borderBottomColor: string;
|
|
5
|
+
/** The marginTop of the line. */
|
|
6
|
+
marginTop?: number;
|
|
7
|
+
/** The marginBottom of the line. */
|
|
8
|
+
marginBottom?: number;
|
|
5
9
|
}
|
|
6
10
|
/** Display a horizontal line for visually separating elements in the user interface. */
|
|
7
11
|
export default class LineSeparator extends React.Component<IProps> {
|
|
@@ -5,14 +5,12 @@ export default class LineSeparator extends React.Component {
|
|
|
5
5
|
/** @return JSX element for displaying a thin horizontal line in the given color. */
|
|
6
6
|
render() {
|
|
7
7
|
return (<React.Fragment>
|
|
8
|
-
<View style={[lineSeparatorStyles.lineStyle, {
|
|
8
|
+
<View style={[lineSeparatorStyles.lineStyle, { ...this.props }]}/>
|
|
9
9
|
</React.Fragment>);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
const lineSeparatorStyles = StyleSheet.create({
|
|
13
13
|
lineStyle: {
|
|
14
|
-
marginHorizontal: `3%`,
|
|
15
|
-
marginVertical: `2%`,
|
|
16
14
|
borderBottomWidth: 1,
|
|
17
15
|
},
|
|
18
16
|
});
|
|
@@ -9,7 +9,8 @@ export interface IProps {
|
|
|
9
9
|
export default class RecentInsulin extends React.Component<IProps> {
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
|
-
* @returns JSX element that displays a card with the question “Have you taken insulin within the last 4 hours?
|
|
12
|
+
* @returns JSX element that displays a card with the question “Have you taken insulin within the last 4 hours?
|
|
13
|
+
* Along with two buttons labeled “Yes” and “No” respectively.
|
|
13
14
|
* If the user taps the “Yes” button, the onRecentInsulinYes prop callback function should be called.
|
|
14
15
|
* If the user taps the “No” button, the onRecentInsulinNo prop callback function should be called.
|
|
15
16
|
*/
|
|
@@ -4,89 +4,89 @@ import { StyleSheet, TouchableOpacity, View } from "react-native";
|
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
6
|
import { colors } from "../utils/Constants";
|
|
7
|
-
import { infoStyles } from "./InfoBars";
|
|
8
7
|
import { FONTS } from "./styles/fonts";
|
|
9
8
|
import Text from "./Text";
|
|
10
9
|
/** Display a card that prompts the user to recall if they injected insulin recently. */
|
|
11
10
|
export default class RecentInsulin extends React.Component {
|
|
12
11
|
/**
|
|
13
12
|
*
|
|
14
|
-
* @returns JSX element that displays a card with the question “Have you taken insulin within the last 4 hours?
|
|
13
|
+
* @returns JSX element that displays a card with the question “Have you taken insulin within the last 4 hours?
|
|
14
|
+
* Along with two buttons labeled “Yes” and “No” respectively.
|
|
15
15
|
* If the user taps the “Yes” button, the onRecentInsulinYes prop callback function should be called.
|
|
16
16
|
* If the user taps the “No” button, the onRecentInsulinNo prop callback function should be called.
|
|
17
17
|
*/
|
|
18
18
|
render = () => {
|
|
19
19
|
return (<View style={recentInsulinStyles.container}>
|
|
20
|
-
<View style={recentInsulinStyles.
|
|
20
|
+
<View style={recentInsulinStyles.textContainer}>
|
|
21
21
|
<Text style={recentInsulinStyles.recommended}>{i18n._(t `Recommended amount of insulin`)}</Text>
|
|
22
|
-
</View>
|
|
23
|
-
<View style={recentInsulinStyles.takenInsulinContainer}>
|
|
24
22
|
<Text style={recentInsulinStyles.takenInsulin}>
|
|
25
23
|
{i18n._(t `Have you taken insulin within the last 4 hours?`)}
|
|
26
24
|
</Text>
|
|
27
25
|
</View>
|
|
28
26
|
<View style={recentInsulinStyles.buttonContainer}>
|
|
29
|
-
<
|
|
30
|
-
<TouchableOpacity testID={Testing.Id.RecentInsulinTestIds.Yes} onPress={this.props.onRecentInsulinYes} style={[recentInsulinStyles.yesNoContainer, { marginRight: `2%` }]}>
|
|
27
|
+
<TouchableOpacity testID={Testing.Id.RecentInsulinTestIds.Yes} onPress={this.props.onRecentInsulinYes} style={recentInsulinStyles.yesButton}>
|
|
31
28
|
<Text style={recentInsulinStyles.yesNoText}>{i18n._(t `Yes`)}</Text>
|
|
32
29
|
</TouchableOpacity>
|
|
33
|
-
<TouchableOpacity testID={Testing.Id.RecentInsulinTestIds.No} onPress={this.props.onRecentInsulinNo} style={
|
|
30
|
+
<TouchableOpacity testID={Testing.Id.RecentInsulinTestIds.No} onPress={this.props.onRecentInsulinNo} style={recentInsulinStyles.noButton}>
|
|
34
31
|
<Text style={recentInsulinStyles.yesNoText}>{i18n._(t `No`)}</Text>
|
|
35
32
|
</TouchableOpacity>
|
|
36
|
-
<View style={recentInsulinStyles.filler}/>
|
|
37
33
|
</View>
|
|
38
34
|
</View>);
|
|
39
35
|
};
|
|
40
36
|
}
|
|
41
37
|
const recentInsulinStyles = StyleSheet.create({
|
|
42
38
|
container: {
|
|
43
|
-
|
|
39
|
+
minHeight: 200,
|
|
44
40
|
backgroundColor: colors.deepPurple,
|
|
45
41
|
borderRadius: 5,
|
|
42
|
+
marginBottom: 32,
|
|
43
|
+
paddingHorizontal: 16,
|
|
44
|
+
paddingTop: 16,
|
|
45
|
+
paddingBottom: 36,
|
|
46
46
|
},
|
|
47
|
-
|
|
48
|
-
flex: 1,
|
|
47
|
+
textContainer: {
|
|
49
48
|
justifyContent: `center`,
|
|
50
49
|
alignItems: `center`,
|
|
51
|
-
|
|
52
|
-
marginBottom:
|
|
50
|
+
paddingHorizontal: 14.5,
|
|
51
|
+
marginBottom: 32,
|
|
53
52
|
},
|
|
54
53
|
recommended: {
|
|
55
|
-
...
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
justifyContent: `center`,
|
|
60
|
-
alignItems: `center`,
|
|
61
|
-
marginTop: `2%`,
|
|
54
|
+
...FONTS.Poppins.medium_Base,
|
|
55
|
+
color: colors.white,
|
|
56
|
+
textAlign: `center`,
|
|
57
|
+
marginBottom: 2,
|
|
62
58
|
},
|
|
63
59
|
takenInsulin: {
|
|
64
|
-
...
|
|
60
|
+
...FONTS.Poppins.regular_SM,
|
|
61
|
+
color: colors.white,
|
|
65
62
|
textAlign: `center`,
|
|
66
63
|
},
|
|
67
64
|
buttonContainer: {
|
|
68
|
-
flex: 1,
|
|
69
65
|
flexDirection: `row`,
|
|
70
|
-
justifyContent: `
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
justifyContent: `center`,
|
|
67
|
+
paddingHorizontal: 9.5,
|
|
68
|
+
},
|
|
69
|
+
yesButton: {
|
|
70
|
+
flex: 1,
|
|
71
|
+
borderRadius: 50,
|
|
72
|
+
minWidth: 127,
|
|
73
|
+
marginLeft: 30,
|
|
74
|
+
marginRight: 12,
|
|
75
|
+
backgroundColor: colors.teal,
|
|
73
76
|
},
|
|
74
|
-
|
|
77
|
+
noButton: {
|
|
75
78
|
flex: 1,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
borderRadius: 50,
|
|
80
|
+
minWidth: 127,
|
|
81
|
+
marginRight: 30,
|
|
82
|
+
marginLeft: 12,
|
|
83
|
+
backgroundColor: colors.teal,
|
|
81
84
|
},
|
|
82
85
|
yesNoText: {
|
|
83
86
|
...FONTS.Poppins.bold_Base,
|
|
84
87
|
textAlign: `center`,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
color: colors.
|
|
88
|
-
},
|
|
89
|
-
filler: {
|
|
90
|
-
flex: 1,
|
|
88
|
+
paddingHorizontal: 16,
|
|
89
|
+
paddingVertical: 12,
|
|
90
|
+
color: colors.black,
|
|
91
91
|
},
|
|
92
92
|
});
|
|
@@ -85,25 +85,11 @@ export declare const stylesModal: {
|
|
|
85
85
|
};
|
|
86
86
|
scrollViewContainer: {
|
|
87
87
|
flexGrow: number;
|
|
88
|
-
};
|
|
89
|
-
container: {
|
|
90
|
-
flex: number;
|
|
91
|
-
backgroundColor: string;
|
|
92
88
|
justifyContent: "center";
|
|
93
|
-
paddingHorizontal: string;
|
|
94
89
|
};
|
|
95
|
-
|
|
96
|
-
flex: number;
|
|
90
|
+
container: {
|
|
97
91
|
backgroundColor: string;
|
|
98
|
-
justifyContent: "flex-start";
|
|
99
|
-
};
|
|
100
|
-
titleContainer: {
|
|
101
|
-
marginBottom: string;
|
|
102
|
-
};
|
|
103
|
-
recommendationRow: {
|
|
104
92
|
justifyContent: "center";
|
|
105
|
-
alignContent: "center";
|
|
106
|
-
marginBottom: string;
|
|
107
93
|
};
|
|
108
94
|
textTittleMessage: {
|
|
109
95
|
color: string;
|
|
@@ -115,6 +101,8 @@ export declare const stylesModal: {
|
|
|
115
101
|
textMessage: {
|
|
116
102
|
color: string;
|
|
117
103
|
textAlign: "center";
|
|
104
|
+
marginHorizontal: number;
|
|
105
|
+
marginTop: number;
|
|
118
106
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
119
107
|
fontSize: number;
|
|
120
108
|
lineHeight: number;
|
|
@@ -122,27 +110,20 @@ export declare const stylesModal: {
|
|
|
122
110
|
buttonText: {
|
|
123
111
|
color: string;
|
|
124
112
|
textAlign: "center";
|
|
113
|
+
paddingHorizontal: number;
|
|
114
|
+
paddingVertical: number;
|
|
125
115
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
126
116
|
fontSize: number;
|
|
127
117
|
lineHeight: number;
|
|
128
118
|
};
|
|
129
|
-
addToCalculationContainer: {
|
|
130
|
-
justifyContent: "flex-start";
|
|
131
|
-
marginVertical: string;
|
|
132
|
-
};
|
|
133
119
|
innerView: {
|
|
134
120
|
alignContent: "center";
|
|
135
|
-
paddingVertical: string;
|
|
136
|
-
paddingHorizontal: string;
|
|
137
|
-
marginTop: string;
|
|
138
121
|
borderRadius: number;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
flexDirection: "row";
|
|
145
|
-
marginBottom: string;
|
|
122
|
+
backgroundColor: string;
|
|
123
|
+
paddingVertical: number;
|
|
124
|
+
marginHorizontal: number;
|
|
125
|
+
marginTop: number;
|
|
126
|
+
marginBottom: number;
|
|
146
127
|
};
|
|
147
128
|
suggestedCarbs: {
|
|
148
129
|
color: string;
|
|
@@ -152,6 +133,7 @@ export declare const stylesModal: {
|
|
|
152
133
|
};
|
|
153
134
|
textCenter: {
|
|
154
135
|
textAlign: "center";
|
|
136
|
+
paddingHorizontal: number;
|
|
155
137
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
156
138
|
fontSize: number;
|
|
157
139
|
lineHeight: number;
|
|
@@ -159,6 +141,8 @@ export declare const stylesModal: {
|
|
|
159
141
|
recommendEatingText: {
|
|
160
142
|
color: string;
|
|
161
143
|
textAlign: "center";
|
|
144
|
+
paddingHorizontal: number;
|
|
145
|
+
marginBottom: number;
|
|
162
146
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
163
147
|
fontSize: number;
|
|
164
148
|
lineHeight: number;
|
|
@@ -172,6 +156,8 @@ export declare const stylesModal: {
|
|
|
172
156
|
addToCalculation: {
|
|
173
157
|
color: string;
|
|
174
158
|
textAlign: "center";
|
|
159
|
+
marginBottom: number;
|
|
160
|
+
marginHorizontal: number;
|
|
175
161
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
176
162
|
fontSize: number;
|
|
177
163
|
lineHeight: number;
|
|
@@ -179,52 +165,31 @@ export declare const stylesModal: {
|
|
|
179
165
|
recommendationButtonsContainer: {
|
|
180
166
|
justifyContent: "center";
|
|
181
167
|
flexDirection: "row";
|
|
182
|
-
|
|
168
|
+
paddingHorizontal: number;
|
|
183
169
|
};
|
|
184
|
-
|
|
170
|
+
carbsButtonText: {
|
|
185
171
|
color: string;
|
|
186
172
|
textAlign: "center";
|
|
173
|
+
paddingHorizontal: number;
|
|
174
|
+
paddingVertical: number;
|
|
187
175
|
fontFamily: import("./styles/fonts").FontFamily;
|
|
188
176
|
fontSize: number;
|
|
189
177
|
lineHeight: number;
|
|
190
178
|
};
|
|
191
|
-
|
|
192
|
-
color: string;
|
|
193
|
-
textAlign: "center";
|
|
194
|
-
fontFamily: import("./styles/fonts").FontFamily;
|
|
195
|
-
fontSize: number;
|
|
196
|
-
lineHeight: number;
|
|
197
|
-
};
|
|
198
|
-
affirmativeCarbsButton: {
|
|
199
|
-
marginTop: string;
|
|
200
|
-
borderRadius: number;
|
|
201
|
-
borderWidth: number;
|
|
202
|
-
borderColor: string;
|
|
203
|
-
width: number;
|
|
204
|
-
height: number;
|
|
205
|
-
alignSelf: "center";
|
|
206
|
-
justifyContent: "center";
|
|
207
|
-
marginRight: string;
|
|
208
|
-
};
|
|
209
|
-
negativeCarbsButton: {
|
|
210
|
-
marginTop: string;
|
|
179
|
+
button: {
|
|
211
180
|
borderRadius: number;
|
|
212
181
|
borderWidth: number;
|
|
213
182
|
borderColor: string;
|
|
214
|
-
width: number;
|
|
215
|
-
height: number;
|
|
216
183
|
alignSelf: "center";
|
|
217
|
-
|
|
218
|
-
marginLeft: string;
|
|
184
|
+
minWidth: number;
|
|
219
185
|
};
|
|
220
186
|
okButton: {
|
|
221
|
-
|
|
187
|
+
backgroundColor: string;
|
|
188
|
+
justifyContent: "flex-start";
|
|
222
189
|
borderRadius: number;
|
|
223
190
|
borderWidth: number;
|
|
224
191
|
borderColor: string;
|
|
225
|
-
width: number;
|
|
226
|
-
height: number;
|
|
227
192
|
alignSelf: "center";
|
|
228
|
-
|
|
193
|
+
minWidth: number;
|
|
229
194
|
};
|
|
230
195
|
};
|