@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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.2.81",
7
+ "version": "1.2.82",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
@@ -1,9 +1,10 @@
1
1
  import React, { ReactElement, memo } from "react";
2
- import { Text, Image, ViewStyle, View, StyleSheet } from 'react-native'
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('add_randomtimecycle_subheadline_text')}</Text>
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
- <View style={styles.summaryLeft}>
26
- <Image
27
- source={res.summary_icon1}
28
- resizeMode="contain"
29
- style={styles.summaryImg}
30
- />
31
- <View>
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
- <View style={styles.summaryLeft}>
43
- <Image
44
- source={res.summary_icon2}
45
- resizeMode="contain"
46
- style={styles.summaryImg}
47
- />
48
- <View>
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
- <View style={styles.summaryLeft}>
60
- <Image
61
- source={res.summary_icon3}
62
- resizeMode="contain"
63
- style={styles.summaryImg}
64
- />
65
- <View>
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