native-pytech 1.0.118 → 1.0.120

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.
@@ -1,6 +1,6 @@
1
1
  import { LinearGradient } from 'expo-linear-gradient';
2
2
  import React, { memo, useCallback, useMemo } from 'react';
3
- import { Pressable, StyleSheet, View } from 'react-native';
3
+ import { Pressable as PressableRN, StyleSheet, View } from 'react-native';
4
4
  import colors from '../../constants';
5
5
  import Table from '../Table';
6
6
  import { useTable } from '../../context/table';
@@ -33,9 +33,9 @@ export default memo(({ children, childrenLeft, childrenRight, onPress, style, ba
33
33
  </>;
34
34
  const styleView = useMemo(() => [styles.Item_View, style], [style]);
35
35
  const childrenOption = onPress === undefined ? <View style={styleView}>{content}</View>
36
- : (backgroundColorPressed ? (<Pressable onPress={onPress} style={({ pressed }) => !pressed ? styleView : [styleView, { backgroundColor: backgroundColorPressed }]}>
36
+ : (backgroundColorPressed ? (<PressableRN onPress={onPress} style={({ pressed }) => !pressed ? styleView : [styleView, { backgroundColor: backgroundColorPressed }]}>
37
37
  {content}
38
- </Pressable>) : (<PressableView onPress={onPress} colorScheme={colorScheme} styleView={styleView}>
38
+ </PressableRN>) : (<PressableView onPress={onPress} colorScheme={colorScheme} styleView={styleView}>
39
39
  {content}
40
40
  </PressableView>));
41
41
  return (LinearGradientProps ?
@@ -47,9 +47,9 @@ export default memo(({ children, childrenLeft, childrenRight, onPress, style, ba
47
47
  const PressableView = memo(({ children, onPress, colorScheme, styleView }) => {
48
48
  const { colorThemeType } = useTable();
49
49
  const backgroundColorPressed = colors.table[colorThemeType][colorScheme].background_pressed;
50
- return (<Pressable onPress={onPress} style={({ pressed }) => !pressed ? styleView : [styleView, { backgroundColor: backgroundColorPressed }]}>
50
+ return (<PressableRN onPress={onPress} style={({ pressed }) => !pressed ? styleView : [styleView, { backgroundColor: backgroundColorPressed }]}>
51
51
  {children}
52
- </Pressable>);
52
+ </PressableRN>);
53
53
  });
54
54
  /*
55
55
  const pressableChildren = useCallback(({ pressed }: { pressed: boolean }) => (
@@ -6,9 +6,15 @@ import { type ColorSchemeType } from '../../constants';
6
6
  */
7
7
  type Props = {
8
8
  text: string;
9
- enabled: boolean;
9
+ /**
10
+ @default true
11
+ */
12
+ enabled?: boolean;
10
13
  fontScale?: string;
11
- style: StyleProp<TextStyle>;
14
+ /**
15
+ @default {}
16
+ */
17
+ style?: StyleProp<TextStyle>;
12
18
  };
13
19
  declare const _default: React.MemoExoticComponent<({ ...props }: Props & {
14
20
  colorScheme?: ColorSchemeType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.118",
3
+ "version": "1.0.120",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",