@momo-kits/native-kits 0.89.33-beta.32 → 0.89.33-beta.34

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.
@@ -3,6 +3,7 @@ plugins {
3
3
  alias(libs.plugins.jetbrains.kotlin.multiplatform)
4
4
  alias(libs.plugins.compose)
5
5
  alias(libs.plugins.kotlin.compose.compiler)
6
+ kotlin("plugin.serialization")
6
7
  id("maven-publish")
7
8
  }
8
9
 
@@ -32,6 +32,7 @@ import androidx.compose.ui.unit.Dp
32
32
  import androidx.compose.ui.unit.dp
33
33
  import androidx.compose.ui.unit.min
34
34
  import androidx.compose.ui.zIndex
35
+ import kotlinx.serialization.Serializable
35
36
  import kotlinx.serialization.json.Json
36
37
  import vn.momo.kits.components.InputSearchProps
37
38
  import vn.momo.kits.const.AppStatusBar
@@ -48,7 +49,8 @@ enum class HeaderType {
48
49
  NONE
49
50
  }
50
51
 
51
- data class ConfigData(val headerBanner: String)
52
+ @Serializable
53
+ data class ConfigData(val headerBanner: String? = null)
52
54
 
53
55
  @Composable
54
56
  fun Screen(
@@ -84,7 +86,7 @@ fun Screen(
84
86
 
85
87
  val platformApi = PlatformApi.current
86
88
  val rawData = platformApi.request("GetConfig", "DESIGN_SYSTEM")
87
- val json = Json {ignoreUnknownKeys = true}
89
+ val json = Json { ignoreUnknownKeys = true }
88
90
  val headerBanner = json.decodeFromString<ConfigData>(rawData).headerBanner
89
91
 
90
92
  val indicator = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
@@ -103,7 +105,11 @@ fun Screen(
103
105
  ) {
104
106
 
105
107
  if (animatedHeader === null) {
106
- HeaderBackground(headerType = headerType, scrollState = scrollState.value, headerBanner=headerBanner)
108
+ HeaderBackground(
109
+ headerType = headerType,
110
+ scrollState = scrollState.value,
111
+ headerBanner = headerBanner
112
+ )
107
113
  } else {
108
114
  Box(
109
115
  Modifier.zIndex(2f)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.33-beta.32",
3
+ "version": "0.89.33-beta.34",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},