@ledvance/base 1.1.13 → 1.1.15

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.
Files changed (65) hide show
  1. package/.prettierrc.js +0 -0
  2. package/package.json +1 -1
  3. package/src/api/native.d.ts +5 -0
  4. package/src/api/native.ts +193 -160
  5. package/src/api/nativeEventEmitter.ts +54 -54
  6. package/src/components/Card.tsx +25 -25
  7. package/src/components/Cell.tsx +32 -32
  8. package/src/components/ColorAdjustView.tsx +44 -44
  9. package/src/components/ColorTempAdjustView.tsx +37 -37
  10. package/src/components/ColorsLine.d.ts +7 -0
  11. package/src/components/ColorsLine.tsx +48 -0
  12. package/src/components/DeleteButton.d.ts +1 -1
  13. package/src/components/DeleteButton.tsx +27 -27
  14. package/src/components/Dialog.tsx +28 -28
  15. package/src/components/FanAdjustView.tsx +115 -105
  16. package/src/components/InfoText.tsx +29 -29
  17. package/src/components/LampAdjustView.tsx +52 -52
  18. package/src/components/LinearGradientLine.tsx +53 -53
  19. package/src/components/MoodColorsLine.d.ts +9 -0
  20. package/src/components/MoodColorsLine.tsx +38 -0
  21. package/src/components/Page.tsx +34 -34
  22. package/src/components/Popup.tsx +17 -17
  23. package/src/components/Segmented.d.ts +2 -2
  24. package/src/components/Segmented.tsx +66 -65
  25. package/src/components/Spacer.tsx +5 -5
  26. package/src/components/Tag.tsx +42 -42
  27. package/src/components/TextButton.d.ts +1 -1
  28. package/src/components/TextButton.tsx +23 -23
  29. package/src/components/TextField.tsx +58 -58
  30. package/src/components/connect.tsx +10 -10
  31. package/src/components/ldvColorBrightness.tsx +12 -12
  32. package/src/components/ldvColorSlider.tsx +109 -109
  33. package/src/components/ldvPickerView.tsx +70 -70
  34. package/src/components/ldvPresetView.tsx +68 -68
  35. package/src/components/ldvSaturation.tsx +14 -14
  36. package/src/components/ldvSlider.d.ts +3 -3
  37. package/src/components/ldvSlider.tsx +93 -93
  38. package/src/components/ldvSwitch.tsx +35 -35
  39. package/src/components/ldvTemperatureSlider.tsx +120 -120
  40. package/src/components/ldvTopBar.tsx +50 -50
  41. package/src/components/ldvTopName.tsx +44 -44
  42. package/src/components/segmentControl.tsx +59 -59
  43. package/src/components/weekSelect.tsx +76 -76
  44. package/src/composeLayout.tsx +165 -165
  45. package/src/i18n/index.ts +12 -12
  46. package/src/i18n/strings.ts +11004 -11004
  47. package/src/main.tsx +4 -4
  48. package/src/models/GlobalParams.ts +7 -7
  49. package/src/models/TuyaApi.d.ts +3 -3
  50. package/src/models/TuyaApi.ts +61 -61
  51. package/src/models/combine.ts +7 -7
  52. package/src/models/configureStore.ts +14 -14
  53. package/src/models/index.ts +4 -4
  54. package/src/models/modules/NativePropsSlice.tsx +170 -169
  55. package/src/models/modules/Result.ts +8 -8
  56. package/src/models/modules/common.ts +90 -90
  57. package/src/res/index.ts +35 -35
  58. package/src/utils/ColorParser.ts +150 -150
  59. package/src/utils/ColorUtils.tsx +414 -414
  60. package/src/utils/Support.d.ts +9 -0
  61. package/src/utils/Support.ts +85 -0
  62. package/src/utils/cctUtils.d.ts +1 -0
  63. package/src/utils/cctUtils.ts +111 -0
  64. package/src/utils/common.ts +186 -174
  65. package/src/utils/index.ts +123 -123
@@ -1,45 +1,45 @@
1
- import React, { PropsWithChildren } from 'react'
2
- import { View, ViewProps } from 'react-native'
1
+ import React, {PropsWithChildren} from 'react'
2
+ import {View, ViewProps} from 'react-native'
3
3
  import LDVTopBar from './ldvTopBar'
4
- import { useNavigation } from '@react-navigation/native'
4
+ import {useNavigation} from '@react-navigation/native'
5
5
  import LdvTopName from './ldvTopName'
6
6
 
7
7
  interface PageProps extends PropsWithChildren<ViewProps> {
8
- backText: string
9
- onBackClick?: () => void
10
- rightButtonIcon?: string
11
- rightButtonIconClick?: () => void
12
- headlineText?: string
13
- headlineIcon?: string | number
14
- onHeadlineIconClick?: () => void
15
- showGreenery?: boolean
16
- greeneryIcon?: string | undefined | number
8
+ backText: string
9
+ onBackClick?: () => void
10
+ rightButtonIcon?: string
11
+ rightButtonIconClick?: () => void
12
+ headlineText?: string
13
+ headlineIcon?: string | number
14
+ onHeadlineIconClick?: () => void
15
+ showGreenery?: boolean
16
+ greeneryIcon?: string | undefined | number
17
17
  }
18
18
 
19
19
  const Page = (props: PageProps) => {
20
- const navigation = useNavigation()
20
+ const navigation = useNavigation()
21
21
 
22
- return (
23
- <View style={[{ flex: 1 }, props.style]}>
24
- <LDVTopBar
25
- title={props.backText}
26
- onBackPress={props.onBackClick || (() => {
27
- navigation.goBack()
28
- })}
29
- rightButtonIcon={props.rightButtonIcon}
30
- onRightButtonPress={props.rightButtonIconClick}
31
- />
32
- {props.headlineText &&
33
- <LdvTopName
34
- title={props.headlineText}
35
- rightIcon={props.headlineIcon}
36
- rightIconClick={props.onHeadlineIconClick}
37
- showGreenery={props.showGreenery}
38
- greeneryIcon={props.greeneryIcon}
39
- />}
40
- {props.children}
41
- </View>
42
- )
22
+ return (
23
+ <View style={[{flex: 1}, props.style]}>
24
+ <LDVTopBar
25
+ title={props.backText}
26
+ onBackPress={props.onBackClick || (() => {
27
+ navigation.goBack()
28
+ })}
29
+ rightButtonIcon={props.rightButtonIcon}
30
+ onRightButtonPress={props.rightButtonIconClick}
31
+ />
32
+ {props.headlineText &&
33
+ <LdvTopName
34
+ title={props.headlineText}
35
+ rightIcon={props.headlineIcon}
36
+ rightIconClick={props.onHeadlineIconClick}
37
+ showGreenery={props.showGreenery}
38
+ greeneryIcon={props.greeneryIcon}
39
+ />}
40
+ {props.children}
41
+ </View>
42
+ )
43
43
  }
44
44
 
45
45
  export default Page
@@ -1,36 +1,36 @@
1
1
  import React from 'react'
2
- import { View, Text, TouchableOpacity } from 'react-native'
3
- import { Utils, Popup } from 'tuya-panel-kit'
2
+ import {Text, TouchableOpacity, View} from 'react-native'
3
+ import {Popup, Utils} from 'tuya-panel-kit'
4
4
 
5
- const { convertX: cx, height } = Utils.RatioUtils
5
+ const {convertX: cx, height} = Utils.RatioUtils
6
6
 
7
- interface InformationPopupProps{
8
- title: string
9
- confirmText: string
10
- content: any
7
+ interface InformationPopupProps {
8
+ title: string
9
+ confirmText: string
10
+ content: any
11
11
  }
12
12
 
13
13
  const InformationPopup = (props: InformationPopupProps) => {
14
- console.log(props, '< --- props')
14
+ console.log(props, '< --- props')
15
15
 
16
16
  const titleNode = () => {
17
17
  return (
18
- <View style={{ flexDirection: 'row', height: cx(60), justifyContent:'space-between' }}>
19
- <View style={{ flexDirection: 'column-reverse', flex: 1, alignItems: 'center',paddingLeft: cx(12) }}>
18
+ <View style={{flexDirection: 'row', height: cx(60), justifyContent: 'space-between'}}>
19
+ <View style={{flexDirection: 'column-reverse', flex: 1, alignItems: 'center', paddingLeft: cx(12)}}>
20
20
  <Text style={{
21
21
  fontSize: cx(16),
22
22
  fontWeight: 'bold',
23
23
  color: '#000000',
24
24
  paddingBottom: cx(12),
25
-
25
+
26
26
  }}>{props.title}</Text>
27
27
  </View>
28
28
  <TouchableOpacity
29
29
  style={{
30
30
  flexDirection: 'column-reverse',
31
- alignItems:'center',
31
+ alignItems: 'center',
32
32
  paddingBottom: cx(12),
33
- paddingRight: cx(6)
33
+ paddingRight: cx(6),
34
34
  }}
35
35
  onPress={() => Popup.close()}
36
36
  >
@@ -55,15 +55,15 @@ const InformationPopup = (props: InformationPopupProps) => {
55
55
  footer: null,
56
56
  confirmText: '',
57
57
  cancelText: '',
58
- onMaskPress: ({ close }) => {
58
+ onMaskPress: ({close}) => {
59
59
  close()
60
60
  },
61
61
  onConfirm: () => {
62
62
  Popup.close()
63
63
  },
64
- footerWrapperStyle:{
65
- display: 'none'
66
- }
64
+ footerWrapperStyle: {
65
+ display: 'none',
66
+ },
67
67
  })
68
68
 
69
69
 
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
- import { ViewStyle } from "react-native";
1
+ import { ReactNode } from 'react';
2
+ import { ViewStyle } from 'react-native';
3
3
  interface SegmentedItem {
4
4
  label: ReactNode;
5
5
  value: string;
@@ -1,76 +1,77 @@
1
- import React, { ReactNode } from "react";
2
- import { View, Text, TouchableOpacity, StyleSheet, ViewStyle } from "react-native";
3
- import { Utils } from 'tuya-panel-kit'
1
+ import React, {ReactNode} from 'react'
2
+ import {StyleSheet, Text, TouchableOpacity, View, ViewStyle} from 'react-native'
3
+ import {Utils} from 'tuya-panel-kit'
4
4
 
5
- const { convertX: cx } = Utils.RatioUtils
5
+ const {convertX: cx} = Utils.RatioUtils
6
6
 
7
- interface SegmentedItem{
8
- label: ReactNode
9
- value: string
7
+ interface SegmentedItem {
8
+ label: ReactNode
9
+ value: string
10
10
  }
11
- interface SegmentedProps{
12
- value?: string | number
13
- options?: SegmentedItem[]
14
- onChange?: (v:string) => void
15
- style?: ViewStyle
11
+
12
+ interface SegmentedProps {
13
+ value?: string | number
14
+ options?: SegmentedItem[]
15
+ onChange?: (v: string) => void
16
+ style?: ViewStyle
16
17
  }
17
18
 
18
- const Segmented = (props: SegmentedProps) =>{
19
- return (
20
- <View style={[styles.wrap_container, props.style]}>
21
- {props.options && props.options.map((item,idx) => (
22
- <TouchableOpacity
23
- style={[
24
- styles.segmented_item,
25
- idx === 0 && styles.segmented_item_first,
26
- idx + 1 === props.options?.length && styles.segmented_item_last,
27
- item.value === props.value && styles.segmented_item_check
28
- ]}
29
- onPress={() => props.onChange && props.onChange(item.value)}
30
- key={idx}
31
- >
32
- <Text style={[
33
- styles.segmented_text,
34
- item.value === props.value && styles.segmented_text_check
35
- ]}>{item.label}</Text>
36
- </TouchableOpacity>
37
- ))}
38
- </View>
39
- )
19
+ const Segmented = (props: SegmentedProps) => {
20
+ return (
21
+ <View style={[styles.wrap_container, props.style]}>
22
+ {props.options && props.options.map((item, idx) => (
23
+ <TouchableOpacity
24
+ style={[
25
+ styles.segmented_item,
26
+ idx === 0 && styles.segmented_item_first,
27
+ idx + 1 === props.options?.length && styles.segmented_item_last,
28
+ item.value === props.value && styles.segmented_item_check,
29
+ ]}
30
+ onPress={() => props.onChange && props.onChange(item.value)}
31
+ key={idx}
32
+ >
33
+ <Text style={[
34
+ styles.segmented_text,
35
+ item.value === props.value && styles.segmented_text_check,
36
+ ]}>{item.label}</Text>
37
+ </TouchableOpacity>
38
+ ))}
39
+ </View>
40
+ )
40
41
  }
41
42
 
42
43
  export default Segmented
43
44
 
44
45
  const styles = StyleSheet.create({
45
- wrap_container:{
46
- flexDirection: 'row',
47
- height: cx(42),
48
- backgroundColor: '#f6f6f6',
49
- padding: cx(2),
50
- borderRadius: cx(8)
51
- },
52
- segmented_item:{
53
- flex: 1,
54
- alignItems: 'center',
55
- justifyContent: 'center',
56
- backgroundColor: '#fff'
57
- },
58
- segmented_item_first:{
59
- borderBottomLeftRadius: cx(8),
60
- borderTopLeftRadius: cx(8),
61
- },
62
- segmented_item_last:{
63
- borderBottomRightRadius: cx(8),
64
- borderTopRightRadius: cx(8)
65
- },
66
- segmented_item_check:{
67
- backgroundColor: '#f60'
68
- },
69
- segmented_text:{
70
- fontSize: cx(16),
71
- color: '#999',
72
- },
73
- segmented_text_check:{
74
- color: '#fff'
75
- }
46
+ wrap_container: {
47
+ flexDirection: 'row',
48
+ height: cx(42),
49
+ backgroundColor: '#f6f6f6',
50
+ padding: cx(2),
51
+ borderRadius: cx(8),
52
+ },
53
+ segmented_item: {
54
+ flex: 1,
55
+ alignItems: 'center',
56
+ justifyContent: 'center',
57
+ backgroundColor: '#fff',
58
+ },
59
+ segmented_item_first: {
60
+ borderBottomLeftRadius: cx(8),
61
+ borderTopLeftRadius: cx(8),
62
+ },
63
+ segmented_item_last: {
64
+ borderBottomRightRadius: cx(8),
65
+ borderTopRightRadius: cx(8),
66
+ },
67
+ segmented_item_check: {
68
+ backgroundColor: '#f60',
69
+ },
70
+ segmented_text: {
71
+ fontSize: cx(16),
72
+ color: '#999',
73
+ },
74
+ segmented_text_check: {
75
+ color: '#fff',
76
+ },
76
77
  })
@@ -1,14 +1,14 @@
1
- import { View, ViewProps } from 'react-native'
1
+ import {View, ViewProps} from 'react-native'
2
2
  import React from 'react'
3
- import { Utils } from 'tuya-panel-kit'
3
+ import {Utils} from 'tuya-panel-kit'
4
4
 
5
5
  const cx = Utils.RatioUtils.convertX
6
6
 
7
7
  interface SpacerProps extends ViewProps {
8
- width?: number
9
- height?: number
8
+ width?: number
9
+ height?: number
10
10
  }
11
11
 
12
12
  export default function Spacer(props: SpacerProps) {
13
- return <View style={[{ width: props.width, height: props.height || cx(20) }, props.style]} />
13
+ return <View style={[{width: props.width, height: props.height || cx(20)}, props.style]}/>
14
14
  }
@@ -1,57 +1,57 @@
1
- import { Image, StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
1
+ import {Image, StyleSheet, Text, TouchableOpacity, View, ViewProps} from 'react-native'
2
2
  import React from 'react'
3
- import { Utils } from 'tuya-panel-kit'
3
+ import {Utils} from 'tuya-panel-kit'
4
4
  import res from '../res'
5
5
 
6
6
  const cx = Utils.RatioUtils.convertX
7
7
 
8
8
  interface TagProps extends ViewProps {
9
- checked: boolean
10
- text: string
11
- onCheckedChange: (boolean) => void
9
+ checked: boolean
10
+ text: string
11
+ onCheckedChange: (boolean) => void
12
12
  }
13
13
 
14
14
  const Tag = (props: TagProps) => {
15
- return (
16
- <TouchableOpacity
17
- onPress={() => {
18
- props.onCheckedChange(!props.checked)
19
- }}>
20
- <View style={[styles.root, props.checked ? { backgroundColor: '#ffe0d4' } : {}, props.style]}>
21
- <Text style={[styles.text, { marginEnd: cx(props.checked ? 4 : 12) }]}>{props.text}</Text>
22
- {
23
- props.checked &&
24
- <Image
25
- source={res.ic_arrows_nav_clear}
26
- style={styles.icon} />
27
- }
28
- </View>
29
- </TouchableOpacity>
30
- )
15
+ return (
16
+ <TouchableOpacity
17
+ onPress={() => {
18
+ props.onCheckedChange(!props.checked)
19
+ }}>
20
+ <View style={[styles.root, props.checked ? {backgroundColor: '#ffe0d4'} : {}, props.style]}>
21
+ <Text style={[styles.text, {marginEnd: cx(props.checked ? 4 : 12)}]}>{props.text}</Text>
22
+ {
23
+ props.checked &&
24
+ <Image
25
+ source={res.ic_arrows_nav_clear}
26
+ style={styles.icon}/>
27
+ }
28
+ </View>
29
+ </TouchableOpacity>
30
+ )
31
31
  }
32
32
 
33
33
  const styles = StyleSheet.create({
34
- root: {
35
- height: cx(24),
36
- flexDirection: 'row',
37
- justifyContent: 'center',
38
- alignItems: 'center',
39
- borderWidth: cx(1),
40
- borderColor: '#ff6600',
41
- borderRadius: cx(12),
42
- },
43
- text: {
44
- marginStart: cx(12),
45
- color: '#ff6600',
46
- fontSize: cx(14),
47
- fontFamily: 'helvetica_neue_lt_std_roman',
48
- },
49
- icon: {
50
- width: cx(12),
51
- height: cx(12),
52
- marginEnd: cx(6),
53
- tintColor: '#F60',
54
- },
34
+ root: {
35
+ height: cx(24),
36
+ flexDirection: 'row',
37
+ justifyContent: 'center',
38
+ alignItems: 'center',
39
+ borderWidth: cx(1),
40
+ borderColor: '#ff6600',
41
+ borderRadius: cx(12),
42
+ },
43
+ text: {
44
+ marginStart: cx(12),
45
+ color: '#ff6600',
46
+ fontSize: cx(14),
47
+ fontFamily: 'helvetica_neue_lt_std_roman',
48
+ },
49
+ icon: {
50
+ width: cx(12),
51
+ height: cx(12),
52
+ marginEnd: cx(6),
53
+ tintColor: '#F60',
54
+ },
55
55
  })
56
56
 
57
57
  export default Tag
@@ -1,4 +1,4 @@
1
- import { StyleProp, ViewStyle, TextStyle } from 'react-native';
1
+ import { StyleProp, TextStyle, ViewStyle } from 'react-native';
2
2
  interface TextButtonProps {
3
3
  text: string;
4
4
  onPress: () => void;
@@ -1,32 +1,32 @@
1
- import { TouchableOpacity, Text, StyleProp, ViewStyle, TextStyle } from 'react-native'
1
+ import {StyleProp, Text, TextStyle, TouchableOpacity, ViewStyle} from 'react-native'
2
2
  import React from 'react'
3
- import { Utils } from 'tuya-panel-kit'
3
+ import {Utils} from 'tuya-panel-kit'
4
4
 
5
5
  const cx = Utils.RatioUtils.convertX
6
6
 
7
7
  interface TextButtonProps {
8
- text: string,
9
- onPress: () => void,
10
- style?: StyleProp<ViewStyle>
11
- textStyle?: StyleProp<TextStyle>
8
+ text: string,
9
+ onPress: () => void,
10
+ style?: StyleProp<ViewStyle>
11
+ textStyle?: StyleProp<TextStyle>
12
12
  }
13
13
 
14
14
  export default function TextButton(props: TextButtonProps) {
15
- return (
16
- <TouchableOpacity
17
- style={[{
18
- justifyContent: 'center',
19
- alignItems: 'center',
20
- alignSelf: 'center',
21
- paddingVertical: cx(8),
22
- paddingHorizontal: cx(12),
23
- }, props.style]}
24
- onPress={props.onPress}>
25
- <Text style={[{
26
- color: '#f60',
27
- fontSize: cx(14),
28
- fontFamily: 'helvetica_neue_lt_std_roman',
29
- }, props.textStyle]}>{props.text}</Text>
30
- </TouchableOpacity>
31
- )
15
+ return (
16
+ <TouchableOpacity
17
+ style={[{
18
+ justifyContent: 'center',
19
+ alignItems: 'center',
20
+ alignSelf: 'center',
21
+ paddingVertical: cx(8),
22
+ paddingHorizontal: cx(12),
23
+ }, props.style]}
24
+ onPress={props.onPress}>
25
+ <Text style={[{
26
+ color: '#f60',
27
+ fontSize: cx(14),
28
+ fontFamily: 'helvetica_neue_lt_std_roman',
29
+ }, props.textStyle]}>{props.text}</Text>
30
+ </TouchableOpacity>
31
+ )
32
32
  }
@@ -1,6 +1,6 @@
1
- import { Image, StyleSheet, Text, TextInput, TextInputProps, TouchableOpacity, View } from 'react-native'
1
+ import {Image, StyleSheet, Text, TextInput, TextInputProps, TouchableOpacity, View} from 'react-native'
2
2
  import React from 'react'
3
- import { Utils } from 'tuya-panel-kit'
3
+ import {Utils} from 'tuya-panel-kit'
4
4
  import res from '../res'
5
5
 
6
6
  const cx = Utils.RatioUtils.convertX
@@ -10,65 +10,65 @@ interface TextFieldProps extends TextInputProps {
10
10
  }
11
11
 
12
12
  const TextField = (props: TextFieldProps) => {
13
- return (
14
- <View style={props.style}>
15
- <Text style={[styles.topTip, { opacity: (!!props.value) ? 1 : 0 }]}>{props.placeholder}</Text>
16
- <View style={styles.textInputGroup}>
17
- <TextInput{...props} style={styles.textInput} />
18
- {!!props.value &&
19
- <TouchableOpacity
20
- style={styles.iconTouchable}
21
- onPress={() => {
22
- props.onChangeText && props.onChangeText('')
23
- }}>
24
- <Image source={{ uri: res.ic_cancel }} style={styles.icon} />
25
- </TouchableOpacity>
26
- }
27
- <View style={styles.line} />
28
- </View>
29
- </View>
30
- )
13
+ return (
14
+ <View style={props.style}>
15
+ <Text style={[styles.topTip, {opacity: (!!props.value) ? 1 : 0}]}>{props.placeholder}</Text>
16
+ <View style={styles.textInputGroup}>
17
+ <TextInput{...props} style={styles.textInput}/>
18
+ {!!props.value &&
19
+ <TouchableOpacity
20
+ style={styles.iconTouchable}
21
+ onPress={() => {
22
+ props.onChangeText && props.onChangeText('')
23
+ }}>
24
+ <Image source={{uri: res.ic_cancel}} style={styles.icon}/>
25
+ </TouchableOpacity>
26
+ }
27
+ <View style={styles.line}/>
28
+ </View>
29
+ </View>
30
+ )
31
31
  }
32
32
 
33
33
  const styles = StyleSheet.create({
34
- topTip: {
35
- marginTop: cx(5),
36
- fontSize: cx(12),
37
- marginStart: cx(13),
38
- color: '#666',
39
- fontFamily: 'helvetica_neue_lt_std_bd',
40
- },
41
- textInputGroup: {
42
- flexDirection: 'row',
43
- borderRadius: cx(4),
44
- backgroundColor: '#f6f6f6',
45
- alignItems: 'center',
46
- },
47
- textInput: {
48
- flex: 1,
49
- height: cx(44),
50
- marginStart: cx(16),
51
- marginEnd: cx(6),
52
- fontSize: cx(16),
53
- color: '#000',
54
- fontFamily: 'helvetica_neue_lt_std_roman',
55
- },
56
- iconTouchable: {
57
- marginEnd: cx(18),
58
- padding: cx(4),
59
- },
60
- icon: {
61
- width: cx(16),
62
- height: cx(16),
63
- },
64
- line: {
65
- height: 1,
66
- position: 'absolute',
67
- start: cx(4),
68
- end: cx(4),
69
- bottom: 0,
70
- backgroundColor: '#cbcbcb',
71
- },
34
+ topTip: {
35
+ marginTop: cx(5),
36
+ fontSize: cx(12),
37
+ marginStart: cx(13),
38
+ color: '#666',
39
+ fontFamily: 'helvetica_neue_lt_std_bd',
40
+ },
41
+ textInputGroup: {
42
+ flexDirection: 'row',
43
+ borderRadius: cx(4),
44
+ backgroundColor: '#f6f6f6',
45
+ alignItems: 'center',
46
+ },
47
+ textInput: {
48
+ flex: 1,
49
+ height: cx(44),
50
+ marginStart: cx(16),
51
+ marginEnd: cx(6),
52
+ fontSize: cx(16),
53
+ color: '#000',
54
+ fontFamily: 'helvetica_neue_lt_std_roman',
55
+ },
56
+ iconTouchable: {
57
+ marginEnd: cx(18),
58
+ padding: cx(4),
59
+ },
60
+ icon: {
61
+ width: cx(16),
62
+ height: cx(16),
63
+ },
64
+ line: {
65
+ height: 1,
66
+ position: 'absolute',
67
+ start: cx(4),
68
+ end: cx(4),
69
+ bottom: 0,
70
+ backgroundColor: '#cbcbcb',
71
+ },
72
72
  })
73
73
 
74
74
  export default TextField
@@ -7,14 +7,14 @@ type ChildrenType = (props: any) => React.ReactElement | null;
7
7
  const Connect = ({children, ...props}: { children: ChildrenType }) => children(props)
8
8
 
9
9
  export default connect(
10
- (state: any, {mapStateToProps}: { mapStateToProps: any }) => mapStateToProps(state),
11
- (dispatch: any, {mapDispatchToProps}: { mapDispatchToProps: any }) => {
12
- if (typeof mapDispatchToProps === 'object') {
13
- return bindActionCreators(mapDispatchToProps, dispatch)
14
- }
15
- if (typeof mapDispatchToProps === 'function') {
16
- return mapDispatchToProps(dispatch)
17
- }
18
- return {}
19
- },
10
+ (state: any, {mapStateToProps}: { mapStateToProps: any }) => mapStateToProps(state),
11
+ (dispatch: any, {mapDispatchToProps}: { mapDispatchToProps: any }) => {
12
+ if (typeof mapDispatchToProps === 'object') {
13
+ return bindActionCreators(mapDispatchToProps, dispatch)
14
+ }
15
+ if (typeof mapDispatchToProps === 'function') {
16
+ return mapDispatchToProps(dispatch)
17
+ }
18
+ return {}
19
+ },
20
20
  )(Connect)