native-pytech 1.0.51 → 1.0.53
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.
- package/dist/libs/components/Gradient/components/Gradient/index.ios.d.ts +4 -0
- package/dist/libs/components/Gradient/components/Gradient/index.ios.js +25 -0
- package/dist/libs/swiftui/src/components/IconSection/Icon.js +2 -4
- package/package.json +1 -1
- package/dist/libs/components/Gradient/components/Icon/index.ios.d.ts +0 -3
- package/dist/libs/components/Gradient/components/Icon/index.ios.js +0 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { memo, useMemo } from 'react';
|
|
2
|
+
import { frame, font, foregroundStyle, background, clipShape } from '@expo/ui/swift-ui/modifiers';
|
|
3
|
+
import { Text, Image } from '@expo/ui/swift-ui';
|
|
4
|
+
import colors, { sizes } from '../../constants';
|
|
5
|
+
export default memo(({ text, color, type = 'small', systemName, iconSize, }) => {
|
|
6
|
+
const typeSizes = useMemo(() => sizes[type], [type]);
|
|
7
|
+
const cantLetras = text?.length ?? 0;
|
|
8
|
+
const modifiers = useMemo(() => [
|
|
9
|
+
frame({ width: typeSizes.diameter, height: typeSizes.diameter }),
|
|
10
|
+
font({ weight: 'semibold', size: typeSizes.fontSize[cantLetras] }),
|
|
11
|
+
foregroundStyle('white'),
|
|
12
|
+
background(colors[color].dark),
|
|
13
|
+
clipShape('circle'),
|
|
14
|
+
], [typeSizes]);
|
|
15
|
+
// Return
|
|
16
|
+
if (text && cantLetras <= 3) {
|
|
17
|
+
return (<Text modifiers={[
|
|
18
|
+
font({ weight: 'semibold', size: typeSizes.fontSize[cantLetras] }),
|
|
19
|
+
...modifiers
|
|
20
|
+
]}>
|
|
21
|
+
{text}
|
|
22
|
+
</Text>);
|
|
23
|
+
}
|
|
24
|
+
return (<Image systemName={systemName} color='white' size={iconSize ?? typeSizes.diameter / 2} modifiers={modifiers}/>);
|
|
25
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button,
|
|
1
|
+
import { Button, VStack } from '@expo/ui/swift-ui';
|
|
2
2
|
import { frame, font, buttonStyle } from '@expo/ui/swift-ui/modifiers';
|
|
3
3
|
import React, { memo } from 'react';
|
|
4
4
|
import Gradient from '../../../../../libs/components/Gradient';
|
|
@@ -7,9 +7,7 @@ import Section from './Section';
|
|
|
7
7
|
export default memo(({ title, subtitle, gradientProps, buttonProps, }) => {
|
|
8
8
|
const spacing = gradientProps?.type === 'extraLarge' ? 10 : 20;
|
|
9
9
|
return (<Section spacing={spacing}>
|
|
10
|
-
{gradientProps && (<
|
|
11
|
-
<Gradient {...gradientProps}/>
|
|
12
|
-
</RNHostView>)}
|
|
10
|
+
{gradientProps && (<Gradient {...gradientProps}/>)}
|
|
13
11
|
|
|
14
12
|
{(title || subtitle) && (subtitle ? (<VStack modifiers={[frame({ alignment: 'center' })]} spacing={2}>
|
|
15
13
|
<Title title={title}/>
|
package/package.json
CHANGED