@ledvance/base 1.2.98 → 1.2.99

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.98",
7
+ "version": "1.2.99",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
package/src/api/native.ts CHANGED
@@ -60,6 +60,8 @@ export interface DeviceInfo {
60
60
  deviceCategory: UADeviceCategory
61
61
  roomName: string
62
62
  status: number
63
+ dps: string
64
+ tuyaDeviceId: string
63
65
  }
64
66
 
65
67
  const devicePanel: LDVDevicePanelManager = NativeModules.LDVDevicePanelManager
@@ -23,6 +23,7 @@ interface PageProps extends PropsWithChildren<ViewProps> {
23
23
  headlineIcon?: string | number
24
24
  onHeadlineIconClick?: () => void
25
25
  headlineContent?: React.ReactNode
26
+ headlineTopContent?: React.ReactNode
26
27
  showGreenery?: boolean
27
28
  greeneryIcon?: string | undefined | number
28
29
  loading?: boolean
@@ -88,6 +89,7 @@ const Page = (props: PageProps) => {
88
89
  showGreenery={props.showGreenery}
89
90
  greeneryIcon={props.greeneryIcon}
90
91
  headlineContent={props.headlineContent}
92
+ headlineTopContent={props.headlineTopContent}
91
93
  />}
92
94
  {props.children}
93
95
  </View>
@@ -1,3 +1,4 @@
1
+ import Spacer from '@ledvance/base/src/components/Spacer'
1
2
  import React from 'react'
2
3
  import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
3
4
  import {Utils} from 'tuya-panel-kit'
@@ -13,6 +14,7 @@ interface LdvTopNameProps {
13
14
  showGreenery?: boolean
14
15
  greeneryIcon?: string | undefined | number
15
16
  headlineContent?: React.ReactNode
17
+ headlineTopContent?: React.ReactNode
16
18
  }
17
19
 
18
20
  const LdvTopName = (props: LdvTopNameProps) => {
@@ -31,12 +33,13 @@ const LdvTopName = (props: LdvTopNameProps) => {
31
33
  })
32
34
  return (
33
35
  <View style={styles.container}>
36
+ {props.headlineTopContent && props.headlineTopContent}
37
+ {!props.headlineTopContent && <Spacer height={cx(38)}/>}
34
38
  <View
35
39
  style={{
36
40
  flexDirection: 'row',
37
41
  justifyContent: 'space-between',
38
42
  alignItems: 'center',
39
- marginTop: cx(38),
40
43
  }}>
41
44
  <View style={{flexDirection: 'row', flex: 1}}>
42
45
  <Text style={styles.title}>
@@ -6,7 +6,7 @@ const {convertX} = Utils.RatioUtils
6
6
 
7
7
  export default function SegmentControl(props) {
8
8
 
9
- const {title1, title2, isFirst, setIsFirst, style} = props
9
+ const {title1, title2, isFirst, setIsFirst, style, tabStyle} = props
10
10
 
11
11
  return (<View style={{}}>
12
12
  <View style={[{
@@ -25,7 +25,7 @@ export default function SegmentControl(props) {
25
25
  borderRadius: convertX(6.9),
26
26
  }, isFirst ?
27
27
  {backgroundColor: '#fff', margin: convertX(2), borderRadius: 6.9} :
28
- {backgroundColor: '#eeeeef'}]
28
+ {backgroundColor: '#eeeeef'}, tabStyle]
29
29
  } onPress={() => setIsFirst(true)}>
30
30
  <Text
31
31
  style={{
@@ -48,7 +48,7 @@ export default function SegmentControl(props) {
48
48
  },
49
49
  !isFirst ?
50
50
  {backgroundColor: '#fff'} :
51
- {backgroundColor: '#eeeeef'}]
51
+ {backgroundColor: '#eeeeef'}, tabStyle]
52
52
  }
53
53
  onPress={() => setIsFirst(false)}>
54
54
  <Text