@ledvance/base 1.2.52 → 1.2.54
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/TextFieldStyleButton.tsx +21 -4
- package/src/i18n/strings.ts +673 -731
package/package.json
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {StyleSheet, Text, TouchableOpacity, View, ViewProps, Image} from 'react-native'
|
|
2
|
+
import {Utils} from 'tuya-panel-kit'
|
|
3
3
|
import React from 'react'
|
|
4
|
+
import res from "../res/index";
|
|
4
5
|
|
|
5
6
|
const cx = Utils.RatioUtils.convertX
|
|
6
7
|
|
|
7
8
|
interface TextFieldStyleButtonProps extends ViewProps {
|
|
8
9
|
placeholder: string
|
|
9
10
|
text: string
|
|
10
|
-
onPress: () => void
|
|
11
|
+
onPress: () => void,
|
|
12
|
+
showTipIcon?: boolean,
|
|
13
|
+
onTipIconPress?: () => void,
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
const TextFieldStyleButton = (props: TextFieldStyleButtonProps) => {
|
|
14
17
|
return (
|
|
15
18
|
<View style={props.style}>
|
|
16
|
-
<
|
|
19
|
+
<View style={styles.tipParent}>
|
|
20
|
+
<Text style={styles.topTip}>{props.placeholder}</Text>
|
|
21
|
+
{props.showTipIcon && <TouchableOpacity onPress={props.onTipIconPress}>
|
|
22
|
+
<Image source={res.ic_info} style={styles.tipIcon}/>
|
|
23
|
+
</TouchableOpacity>}
|
|
24
|
+
</View>
|
|
17
25
|
<TouchableOpacity onPress={props.onPress}>
|
|
18
26
|
<View style={styles.textGroup}>
|
|
19
27
|
<View style={styles.textParent}>
|
|
@@ -60,6 +68,15 @@ const styles = StyleSheet.create({
|
|
|
60
68
|
bottom: 0,
|
|
61
69
|
backgroundColor: '#cbcbcb',
|
|
62
70
|
},
|
|
71
|
+
tipParent: {
|
|
72
|
+
flexDirection: 'row',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
},
|
|
75
|
+
tipIcon: {
|
|
76
|
+
width: cx(16),
|
|
77
|
+
height: cx(16),
|
|
78
|
+
marginStart: cx(4),
|
|
79
|
+
}
|
|
63
80
|
})
|
|
64
81
|
|
|
65
82
|
export default TextFieldStyleButton
|