@umituz/react-native-design-system 2.5.27 → 2.5.28

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.5.27",
3
+ "version": "2.5.28",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -4,18 +4,20 @@ import type { ParamListBase } from "@react-navigation/native";
4
4
  import { AtomicIcon } from "../../../atoms/AtomicIcon";
5
5
  import { useAppDesignTokens } from "../../../theme";
6
6
  import { useSafeAreaInsets } from "../../../safe-area";
7
- import type { TabNavigatorConfig, TabScreen } from "../types";
7
+ import type { TabNavigatorConfig } from "../types";
8
8
 
9
9
  export interface UseTabConfigProps<T extends ParamListBase> {
10
10
  config: TabNavigatorConfig<T>;
11
11
  }
12
12
 
13
- export const useTabConfig = <T extends ParamListBase>({ config }: UseTabConfigProps<T>) => {
13
+ export const useTabConfig = <T extends ParamListBase>({
14
+ config,
15
+ }: UseTabConfigProps<T>) => {
14
16
  const tokens = useAppDesignTokens();
15
17
  const insets = useSafeAreaInsets();
16
18
 
17
- const finalConfig: TabNavigatorConfig<T> = useMemo(
18
- () => ({
19
+ const finalConfig: TabNavigatorConfig<T> = useMemo(() => {
20
+ return {
19
21
  ...config,
20
22
  renderIcon: (
21
23
  iconName: string,
@@ -28,7 +30,7 @@ export const useTabConfig = <T extends ParamListBase>({ config }: UseTabConfigPr
28
30
  return config.renderIcon(iconName, focused, routeName, isFab);
29
31
  }
30
32
 
31
- const screen = config.screens.find(s => s.name === routeName);
33
+ const screen = config.screens.find((s) => s.name === routeName);
32
34
  const fabConfig = config.fabConfig;
33
35
 
34
36
  if (isFab) {
@@ -90,11 +92,12 @@ export const useTabConfig = <T extends ParamListBase>({ config }: UseTabConfigPr
90
92
  color: tokens.colors.textPrimary,
91
93
  },
92
94
  headerTintColor: tokens.colors.textPrimary,
93
- ...(typeof config.screenOptions === 'object' ? config.screenOptions : {}),
95
+ ...(typeof config.screenOptions === "object"
96
+ ? config.screenOptions
97
+ : {}),
94
98
  },
95
- }),
96
- [tokens, config, insets],
97
- );
99
+ };
100
+ }, [tokens, config, insets]);
98
101
 
99
102
  return finalConfig;
100
103
  };