@momo-kits/native-kits 0.89.4 → 0.89.6

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.
@@ -38,6 +38,7 @@ import vn.momo.kits.const.Colors
38
38
  import vn.momo.kits.const.Spacing
39
39
  import vn.momo.kits.const.Typography
40
40
  import vn.momo.kits.utils.bottomBorder
41
+ import vn.momo.kits.utils.getPlatformName
41
42
 
42
43
  enum class TitlePosition {
43
44
  LEFT, CENTER,
@@ -48,9 +49,15 @@ fun HeaderImage(
48
49
  headerType: HeaderType = HeaderType.DEFAULT,
49
50
  headerBackground: String?,
50
51
  ) {
52
+ val statusBarHeight = if (getPlatformName() == "iOS") {
53
+ WindowInsets.systemBars.asPaddingValues().calculateTopPadding()
54
+ } else {
55
+ AppStatusBar.current
56
+ }
57
+
51
58
  when (headerType) {
52
59
  HeaderType.DEFAULT -> {
53
- val height = AppStatusBar.current + 52.dp
60
+ val height = statusBarHeight + 52.dp
54
61
  Image(
55
62
  source = headerBackground ?: "",
56
63
  modifier = Modifier.fillMaxWidth().height(height),
@@ -92,10 +99,15 @@ fun Header(
92
99
  tintIconColor = AppTheme.current.colors.text.default
93
100
  backgroundButton = Color.Transparent
94
101
  }
102
+ val statusBarHeight = if (getPlatformName() == "iOS") {
103
+ WindowInsets.systemBars.asPaddingValues().calculateTopPadding()
104
+ } else {
105
+ AppStatusBar.current
106
+ }
95
107
 
96
108
  if (headerType != HeaderType.NONE) {
97
109
  BoxWithConstraints(
98
- Modifier.height(AppStatusBar.current + 52.dp)
110
+ Modifier.height(statusBarHeight + 52.dp)
99
111
  .background(backgroundColor)
100
112
  .fillMaxWidth()
101
113
  .bottomBorder(
@@ -32,7 +32,7 @@ object Colors {
32
32
  val pink_07 = Color(0xFFF7ACD5)
33
33
  val pink_08 = Color(0xFFFBD5EA)
34
34
  val pink_09 = Color(0xFFFDEAF4)
35
- val pink_10 = Color(0xFEF4FA)
35
+ val pink_10 = Color(0xFFFEF4FA)
36
36
  val pink_11 = Color(0xFFFEF8FC)
37
37
  val pink_MoMo_Branding = Color(0xFFA50064)
38
38
  val violet_01 = Color(0xFF7822C0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.4",
3
+ "version": "0.89.6",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},