@momo-kits/foundation 0.153.1-test.10 → 0.153.2

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 (2) hide show
  1. package/Layout/Screen.tsx +14 -26
  2. package/package.json +1 -2
package/Layout/Screen.tsx CHANGED
@@ -9,9 +9,7 @@ import React, {
9
9
  useContext,
10
10
  useEffect,
11
11
  useImperativeHandle,
12
- useMemo,
13
12
  useRef,
14
- useState,
15
13
  } from 'react';
16
14
  import {
17
15
  Animated,
@@ -202,7 +200,6 @@ const Screen = forwardRef(
202
200
  );
203
201
  const currentTint = useRef<string | undefined>(undefined);
204
202
  const isTab = navigation?.instance?.getState?.()?.type === 'tab';
205
- const [footerHeight, setFooterHeight] = useState(0)
206
203
 
207
204
  let handleScroll;
208
205
  let Component: any = View;
@@ -236,14 +233,14 @@ const Screen = forwardRef(
236
233
  case 'extended':
237
234
  options = {
238
235
  headerShown: true,
239
- headerTransparent: false,
236
+ headerTransparent: true,
240
237
  headerBackground: () => null,
241
238
  headerTitle: (props: any) => <HeaderTitle {...props} />,
242
239
  };
243
240
  if (inputSearchProps) {
244
241
  options = {
245
242
  headerShown: true,
246
- headerTransparent: false,
243
+ headerTransparent: true,
247
244
  headerBackground: () => null,
248
245
  headerTitle: (props: any) => (
249
246
  <HeaderTitle
@@ -279,7 +276,7 @@ const Screen = forwardRef(
279
276
  if (inputSearchProps) {
280
277
  options = {
281
278
  headerShown: true,
282
- headerTransparent: false,
279
+ headerTransparent: true,
283
280
  headerBackground: () => null,
284
281
  headerTitle: (props: any) => (
285
282
  <HeaderTitle
@@ -320,7 +317,7 @@ const Screen = forwardRef(
320
317
 
321
318
  options = {
322
319
  headerTintColor: currentTint.current ?? Colors.black_17,
323
- headerTransparent: false,
320
+ headerTransparent: true,
324
321
  headerBackground: (props: any) => (
325
322
  <HeaderBackground
326
323
  {...props}
@@ -354,7 +351,7 @@ const Screen = forwardRef(
354
351
  const setAnimatedSearch = useCallback(() => {
355
352
  const options: StackNavigationOptions = {
356
353
  headerShown: true,
357
- headerTransparent: false,
354
+ headerTransparent: true,
358
355
  headerBackground: () => null,
359
356
  headerTitle: (props: any) => (
360
357
  <HeaderTitle
@@ -566,20 +563,12 @@ const Screen = forwardRef(
566
563
  }
567
564
  };
568
565
 
569
- const marginTop = useMemo(() => {
570
- if (animatedHeader || inputSearchProps || headerType === "extended") {
571
- return -heightHeader;
572
- }
573
- return undefined;
574
- }, [animatedHeader, headerType, heightHeader, inputSearchProps])
575
-
576
566
  return (
577
567
  <View
578
568
  style={[
579
569
  Styles.flex,
580
570
  {
581
571
  backgroundColor: backgroundColor ?? theme.colors.background.default,
582
- marginTop,
583
572
  },
584
573
  ]}
585
574
  >
@@ -622,13 +611,15 @@ const Screen = forwardRef(
622
611
  </Component>
623
612
 
624
613
  {floatingButtonProps && (
625
- <FloatingButton
626
- {...floatingButtonProps}
627
- animatedValue={animatedValue.current}
628
- bottom={
629
- (Footer || isTab ? 12 : Math.min(insets.bottom, 21)) + Spacing.S + footerHeight
630
- }
631
- />
614
+ <View>
615
+ <FloatingButton
616
+ {...floatingButtonProps}
617
+ animatedValue={animatedValue.current}
618
+ bottom={
619
+ Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
620
+ }
621
+ />
622
+ </View>
632
623
  )}
633
624
 
634
625
  {Footer && (
@@ -640,9 +631,6 @@ const Screen = forwardRef(
640
631
  backgroundColor: theme.colors.background.surface,
641
632
  },
642
633
  ]}
643
- onLayout={(e) => {
644
- setFooterHeight(e.nativeEvent.layout.height)
645
- }}
646
634
  >
647
635
  <Section>{Footer}</Section>
648
636
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.153.1-test.10",
3
+ "version": "0.153.2",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},
@@ -26,7 +26,6 @@
26
26
  "react-native": "*"
27
27
  },
28
28
  "devDependencies": {
29
- "@momo-platform/versions": "4.1.11",
30
29
  "@types/color": "3.0.6"
31
30
  },
32
31
  "publishConfig": {