@momo-kits/native-kits 0.113.2-beta.11 → 0.113.2-beta.12

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.
@@ -67,7 +67,6 @@ fun Header(
67
67
  val statusBarHeight = AppStatusBar.current ?: getStatusBarHeight()
68
68
  val tintIconColor = AppTheme.current.colors.text.default
69
69
  val backgroundButton = Colors.black_01.copy(alpha = 0.6f)
70
- val miniAppContext = ApplicationContext.current
71
70
 
72
71
  var colorFraction by remember { mutableStateOf(0f) }
73
72
 
@@ -80,15 +79,22 @@ fun Header(
80
79
 
81
80
  val backgroundSearch by animateColorAsState(
82
81
  targetValue = animateColor(
83
- Colors.black_01,
82
+ AppTheme.current.colors.background.surface,
84
83
  AppTheme.current.colors.background.default,
85
84
  colorFraction
86
85
  )
87
86
  )
88
87
 
88
+ val backgroundColor = if (scrollState == 0) {
89
+ Color.Transparent
90
+ } else {
91
+ AppTheme.current.colors.background.surface
92
+ }
93
+
89
94
  if (headerType != HeaderType.NONE) {
90
95
  BoxWithConstraints(
91
96
  Modifier.height(statusBarHeight + 52.dp)
97
+ .background(backgroundColor)
92
98
  .fillMaxWidth()
93
99
  .zIndex(10f),
94
100
  contentAlignment = Alignment.BottomCenter
@@ -132,7 +138,7 @@ fun Header(
132
138
  }
133
139
  }
134
140
 
135
- if (((useAnimationSearch && inputSearchProps != null) || inputSearchProps == null) && miniAppContext != null) {
141
+ if ((useAnimationSearch && inputSearchProps != null) || inputSearchProps == null) {
136
142
  Box(Modifier.graphicsLayer {
137
143
  alpha = if (useAnimationSearch) 1f - (opacity ?: 1f) else 1f
138
144
  }) {
@@ -180,6 +180,8 @@ fun ToolkitHeaderRight(headerRight: HeaderRightData? = null) {
180
180
  group.items.any { it.showBadge }
181
181
  }
182
182
 
183
+ if (context === null) return
184
+
183
185
  Row(
184
186
  verticalAlignment = Alignment.CenterVertically
185
187
  ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.113.2-beta.11",
3
+ "version": "0.113.2-beta.12",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},