@ledvance/base 1.2.81 → 1.2.82
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/package.json +1 -1
- package/src/components/Summary.tsx +25 -33
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ReactElement, memo } from "react";
|
|
2
|
-
import { Text,
|
|
2
|
+
import { Text, ViewStyle, View, StyleSheet } from 'react-native'
|
|
3
3
|
import res from "@ledvance/base/src/res"
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n";
|
|
5
5
|
import { Utils } from "tuya-panel-kit";
|
|
6
6
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
7
|
+
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
7
8
|
|
|
8
9
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
10
|
|
|
@@ -18,20 +19,17 @@ interface SummaryProps {
|
|
|
18
19
|
const Summary = (props: SummaryProps) => {
|
|
19
20
|
return (
|
|
20
21
|
<View style={styles.cardContainer}>
|
|
21
|
-
<Text style={styles.itemTitle}>{I18n.getLang('
|
|
22
|
+
<Text style={styles.itemTitle}>{I18n.getLang('add_sleepschedule_one_source_subheadline4_text')}</Text>
|
|
22
23
|
<Spacer height={cx(10)} />
|
|
23
24
|
<View style={{}}>
|
|
24
25
|
<View style={styles.summaryContainer}>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<Text style={styles.leftTitle}>{I18n.getLang('feature_summary_frequency_headline')}</Text>
|
|
33
|
-
</View>
|
|
34
|
-
</View>
|
|
26
|
+
<InfoText
|
|
27
|
+
icon={res.summary_icon1}
|
|
28
|
+
text={I18n.getLang('feature_summary_frequency_headline')}
|
|
29
|
+
iconStyle={styles.summaryImg}
|
|
30
|
+
textStyle={styles.leftTitle}
|
|
31
|
+
style={styles.summaryLeft}
|
|
32
|
+
/>
|
|
35
33
|
<View style={styles.summaryRight}>
|
|
36
34
|
<View style={styles.rightWrap}>
|
|
37
35
|
<Text style={styles.rightItem}>{props.frequency}</Text>
|
|
@@ -39,16 +37,13 @@ const Summary = (props: SummaryProps) => {
|
|
|
39
37
|
</View>
|
|
40
38
|
</View>
|
|
41
39
|
<View style={styles.summaryContainer}>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<Text style={styles.leftTitle}>{I18n.getLang('feature_summary_time_headline')}</Text>
|
|
50
|
-
</View>
|
|
51
|
-
</View>
|
|
40
|
+
<InfoText
|
|
41
|
+
icon={res.summary_icon2}
|
|
42
|
+
text={I18n.getLang('feature_summary_time_headline')}
|
|
43
|
+
iconStyle={styles.summaryImg}
|
|
44
|
+
textStyle={styles.leftTitle}
|
|
45
|
+
style={styles.summaryLeft}
|
|
46
|
+
/>
|
|
52
47
|
<View style={styles.summaryRight}>
|
|
53
48
|
<View style={styles.rightWrap}>
|
|
54
49
|
<Text style={styles.rightItem}>{props.time}</Text>
|
|
@@ -56,16 +51,13 @@ const Summary = (props: SummaryProps) => {
|
|
|
56
51
|
</View>
|
|
57
52
|
</View>
|
|
58
53
|
{!props.hideActions && <View style={[styles.summaryContainer, { alignItems: 'flex-start' }]}>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
54
|
+
<InfoText
|
|
55
|
+
icon={res.summary_icon3}
|
|
56
|
+
text={I18n.getLang('motion_detection_add_time_schedule_actions_text1')}
|
|
57
|
+
iconStyle={styles.summaryImg}
|
|
58
|
+
textStyle={styles.leftTitle}
|
|
59
|
+
style={styles.summaryLeft}
|
|
60
|
+
/>
|
|
69
61
|
<View style={styles.summaryRight}>
|
|
70
62
|
{props.actions}
|
|
71
63
|
</View>
|
|
@@ -108,6 +100,7 @@ const styles = StyleSheet.create({
|
|
|
108
100
|
flex: 1,
|
|
109
101
|
flexDirection: 'column',
|
|
110
102
|
marginLeft: cx(15),
|
|
103
|
+
marginTop: cx(5)
|
|
111
104
|
},
|
|
112
105
|
rightWrap: {
|
|
113
106
|
borderRadius: cx(16),
|
|
@@ -117,7 +110,6 @@ const styles = StyleSheet.create({
|
|
|
117
110
|
},
|
|
118
111
|
rightItem: {
|
|
119
112
|
color: '#000',
|
|
120
|
-
fontSize: cx(14)
|
|
121
113
|
},
|
|
122
114
|
})
|
|
123
115
|
|