native-pytech 1.0.41 → 1.0.43

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.
@@ -7,7 +7,7 @@ export default memo(({ text, color, type = 'small', systemName }) => {
7
7
  const typeSizes = useMemo(() => sizes[type], [type]);
8
8
  const textComponent = useMemo(() => {
9
9
  const cantLetras = text?.length;
10
- if (!text || !cantLetras || systemName)
10
+ if (!text || !cantLetras)
11
11
  return null;
12
12
  if (cantLetras > 3)
13
13
  throw new Error('Text must be less than 3 characters');
@@ -12,10 +12,10 @@ export default memo(({ text, onPress, onSubmit, backgroundColorPage, enabled = t
12
12
  return enabled ? (pressed ?
13
13
  themeColor === 'default' ?
14
14
  colors.especiales.azul_pressed :
15
- colorScheme === 'dark' ? Utils.adjustLightness(backgroundColorPage, 10) : backgroundColorPage
15
+ colorScheme === 'dark' ? Utils.adjustLightness(backgroundColorPage ?? 'white', 10) : backgroundColorPage ?? 'white'
16
16
  : themeColor === 'default' ?
17
17
  Utils.adjustLightness(colors.especiales.azul, -10) :
18
- colorScheme === 'dark' ? backgroundColorPage : Utils.adjustLightness(backgroundColorPage, -1))
18
+ colorScheme === 'dark' ? backgroundColorPage : Utils.adjustLightness(backgroundColorPage ?? 'white', -1))
19
19
  : Theme.colorButtonFooterDisabled;
20
20
  }, [enabled, themeColor, backgroundColorPage, colorScheme]);
21
21
  const _onPress = useCallback(async () => {
@@ -15,6 +15,8 @@ export type Props = {
15
15
  onSubmit?: () => void;
16
16
  /**
17
17
  Color de fondo de la página.
18
+ @android
19
+ @web
18
20
  */
19
- backgroundColorPage: string;
21
+ backgroundColorPage?: string;
20
22
  } & TextProps;
@@ -13,7 +13,7 @@ const Footer = memo(({ children, backgroundColorPage }) => {
13
13
  <BlurView intensity={6} tint='dark' style={StyleSheet.absoluteFillObject}/>
14
14
  </MaskedView>
15
15
 
16
- <Background backgroundColorPage={backgroundColorPage}/>
16
+ {backgroundColorPage && <Background backgroundColorPage={backgroundColorPage}/>}
17
17
 
18
18
  <View style={[styles.view, { paddingBottom: insets.bottom + 5 }]}>
19
19
  {children}
@@ -1,7 +1,7 @@
1
1
  import Button from './Button';
2
2
  type Props = {
3
3
  children: React.ReactNode;
4
- backgroundColorPage: string;
4
+ backgroundColorPage?: string;
5
5
  };
6
6
  export type Component = React.MemoExoticComponent<React.FC<Props>> & {
7
7
  Button: typeof Button;
@@ -1,14 +1,11 @@
1
1
  import { Button, RNHostView, VStack } from '@expo/ui/swift-ui';
2
2
  import { frame, font, buttonStyle } from '@expo/ui/swift-ui/modifiers';
3
- import React, { memo, useMemo } from 'react';
3
+ import React, { memo } from 'react';
4
4
  import Gradient from '../../../../../libs/components/Gradient';
5
5
  import Text from '../Text';
6
6
  import Section from './Section';
7
7
  export default memo(({ title, subtitle, gradientProps, buttonProps, }) => {
8
8
  const spacing = gradientProps?.type === 'extraLarge' ? 10 : 20;
9
- const titleElement = useMemo(() => (<Text modifiers={[font({ weight: 'bold', size: 30 })]}>
10
- {title}
11
- </Text>), [title]);
12
9
  return (<Section spacing={spacing}>
13
10
  {gradientProps && (<RNHostView matchContents>
14
11
  <Gradient {...gradientProps}/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",