native-pytech 1.0.162 → 1.0.164

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,3 +7,4 @@ export { default as Text } from './src/components/Text';
7
7
  export { default as Picker } from './src/components/Picker';
8
8
  export { default as TextSubtitle } from './src/components/TextSubtitle';
9
9
  export { default as Dialog } from './src/components/Dialog';
10
+ export { default as ChevronRight } from './src/components/ChevronRight';
@@ -7,3 +7,4 @@ export { default as Text } from './src/components/Text';
7
7
  export { default as Picker } from './src/components/Picker';
8
8
  export { default as TextSubtitle } from './src/components/TextSubtitle';
9
9
  export { default as Dialog } from './src/components/Dialog';
10
+ export { default as ChevronRight } from './src/components/ChevronRight';
@@ -1,3 +1,3 @@
1
1
  import { TrailingProps } from './types';
2
- declare const _default: import("react").MemoExoticComponent<({ text, textProps }: TrailingProps) => import("react").JSX.Element>;
2
+ declare const _default: import("react").MemoExoticComponent<({ text, textProps, component }: TrailingProps) => import("react").JSX.Element>;
3
3
  export default _default;
@@ -2,11 +2,12 @@ import { Spacer, HStack } from '@expo/ui/swift-ui';
2
2
  import { memo } from 'react';
3
3
  import Text from '../Text';
4
4
  import ChevronRight from '../ChevronRight';
5
- export default memo(({ text, textProps }) => {
5
+ export default memo(({ text, textProps, component }) => {
6
6
  return (<>
7
7
  <Spacer />
8
- {text ? (<HStack spacing={10}>
9
- <Text {...textProps} secondary>{text}</Text>
8
+ {(text || component) ? (<HStack spacing={10}>
9
+ {text && <Text {...textProps} secondary>{text}</Text>}
10
+ {component}
10
11
  <ChevronRight />
11
12
  </HStack>) : (<ChevronRight />)}
12
13
  </>);
@@ -8,6 +8,10 @@ export type TrailingProps = {
8
8
  TextProps to apply to the Trailing Stack text.
9
9
  */
10
10
  textProps?: TextProps;
11
+ /**
12
+ Custom React Node to display instead of the default Trailing Stack (text + ChevronRight).
13
+ */
14
+ component?: React.ReactNode;
11
15
  };
12
16
  type Props = Pick<ButtonProps, 'children' | 'onPress' | 'systemImage' | 'label'> & {
13
17
  /**
@@ -27,5 +31,9 @@ type Props = Pick<ButtonProps, 'children' | 'onPress' | 'systemImage' | 'label'>
27
31
  TextProps to apply to the Trailing Stack text.
28
32
  */
29
33
  trailingTextProps?: TrailingProps['textProps'];
34
+ /**
35
+ Custom React Node to display instead of the default Trailing Stack (text + ChevronRight).
36
+ */
37
+ trailingComponent?: TrailingProps['component'];
30
38
  };
31
39
  export default Props;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.162",
3
+ "version": "1.0.164",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",