native-pytech 1.0.104 → 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,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
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
|
+
{systemImage && <Label title={label} systemImage={systemImage}/>}
|
|
11
12
|
<Trailing text={trailingText} textProps={trailingTextProps}/>
|
|
12
13
|
</HStack>);
|
|
13
14
|
});
|