native-pytech 1.0.103 → 1.0.105
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,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Props from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ children, onPress, icon, label, systemImage, listRowInsets,
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ children, onPress, icon, label, systemImage, listRowInsets, trailingText, trailingTextProps }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Button, HStack, Label } from '@expo/ui/swift-ui';
|
|
2
|
-
import { listRowInsets as listRowInsetsModifier } from '@expo/ui/swift-ui/modifiers';
|
|
2
|
+
import { listRowInsets as listRowInsetsModifier, foregroundStyle } from '@expo/ui/swift-ui/modifiers';
|
|
3
3
|
import React, { memo, useMemo } from 'react';
|
|
4
4
|
import Trailing from './Trailing';
|
|
5
|
-
export default memo(({ children, onPress, icon, label, systemImage, listRowInsets = false,
|
|
5
|
+
export default memo(({ children, onPress, icon, label, systemImage, listRowInsets = false, trailingText, trailingTextProps }) => {
|
|
6
6
|
const modifiers = useMemo(() => listRowInsets ? [listRowInsetsModifier({ top: 20, bottom: 20, leading: 25, trailing: 20 })] : [], [listRowInsets]);
|
|
7
7
|
return (<HStack modifiers={modifiers}>
|
|
8
|
-
<Button onPress={onPress}>
|
|
9
|
-
{children ?? <Label title={label}
|
|
8
|
+
<Button onPress={onPress} modifiers={[foregroundStyle({ type: 'hierarchical', style: 'primary' })]}>
|
|
9
|
+
{children ?? (!systemImage && <Label title={label} icon={icon}/>)}
|
|
10
10
|
</Button>
|
|
11
|
-
<
|
|
11
|
+
{systemImage && <Label title={label} systemImage={systemImage}/>}
|
|
12
|
+
<Trailing text={trailingText} textProps={trailingTextProps}/>
|
|
12
13
|
</HStack>);
|
|
13
14
|
});
|
|
@@ -22,10 +22,10 @@ type Props = Pick<ButtonProps, 'children' | 'onPress' | 'systemImage' | 'label'>
|
|
|
22
22
|
/**
|
|
23
23
|
Text to display on the Trailing Stack.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
trailingText?: TrailingProps['text'];
|
|
26
26
|
/**
|
|
27
27
|
TextProps to apply to the Trailing Stack text.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
trailingTextProps?: TrailingProps['textProps'];
|
|
30
30
|
};
|
|
31
31
|
export default Props;
|