native-pytech 1.0.58 → 1.0.60
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.d.ts +1 -1
- package/dist/libs/components/Gradient/components/Gradient/index.ios.d.ts +1 -1
- package/dist/libs/components/Gradient/components/Gradient/index.ios.js +13 -2
- package/dist/libs/components/Gradient/components/Gradient/index.js +1 -1
- package/dist/libs/components/Gradient/components/Gradient/types.d.ts +7 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Props from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ text, color, type, systemName, iconSize, }: Props) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ text, color, type, sizeDiameter, systemName, iconSize, }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Props from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ text, color, type, systemName, iconSize, }: Props) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ text, color, type, sizeDiameter, systemName, iconSize, }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -2,8 +2,19 @@ import React, { memo, useMemo } from 'react';
|
|
|
2
2
|
import { frame, font, foregroundStyle, background, clipShape } from '@expo/ui/swift-ui/modifiers';
|
|
3
3
|
import { Text, Image } from '@expo/ui/swift-ui';
|
|
4
4
|
import colors, { sizes } from '../../constants';
|
|
5
|
-
export default memo(({ text, color, type = 'small', systemName, iconSize, }) => {
|
|
6
|
-
const typeSizes = useMemo(() =>
|
|
5
|
+
export default memo(({ text, color = 'default', type = 'small', sizeDiameter, systemName, iconSize, }) => {
|
|
6
|
+
const typeSizes = useMemo(() => {
|
|
7
|
+
if (!sizeDiameter)
|
|
8
|
+
return sizes[type];
|
|
9
|
+
return {
|
|
10
|
+
diameter: sizeDiameter,
|
|
11
|
+
fontSize: {
|
|
12
|
+
1: sizeDiameter * 0.53,
|
|
13
|
+
2: sizeDiameter * 0.48,
|
|
14
|
+
3: sizeDiameter * 0.43
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}, [type]);
|
|
7
18
|
const cantLetras = text?.length ?? 0;
|
|
8
19
|
const modifiers = useMemo(() => [
|
|
9
20
|
frame({ width: typeSizes.diameter, height: typeSizes.diameter }),
|
|
@@ -3,7 +3,7 @@ import { StyleSheet, Text } from 'react-native';
|
|
|
3
3
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
4
4
|
import colors, { sizes } from '../../constants';
|
|
5
5
|
import Icon from '../Icon';
|
|
6
|
-
export default memo(({ text, color, type = 'small', systemName, iconSize, }) => {
|
|
6
|
+
export default memo(({ text, color = 'default', type = 'small', sizeDiameter, systemName, iconSize, }) => {
|
|
7
7
|
const typeSizes = useMemo(() => sizes[type], [type]);
|
|
8
8
|
const textComponent = useMemo(() => {
|
|
9
9
|
const cantLetras = text?.length;
|
|
@@ -8,13 +8,18 @@ export type Props = Omit<IconProps, 'size'> & {
|
|
|
8
8
|
text?: string;
|
|
9
9
|
/**
|
|
10
10
|
The color of the gradient.
|
|
11
|
+
@default 'default'
|
|
11
12
|
*/
|
|
12
|
-
color
|
|
13
|
+
color?: keyof typeof colors;
|
|
13
14
|
/**
|
|
14
15
|
The size of the gradient.
|
|
15
16
|
@default 'small'
|
|
16
17
|
*/
|
|
17
|
-
type
|
|
18
|
+
type?: sizesType;
|
|
19
|
+
/**
|
|
20
|
+
The size of the gradient. If "type" is provided, this will be ignored.
|
|
21
|
+
*/
|
|
22
|
+
sizeDiameter?: number;
|
|
18
23
|
/**
|
|
19
24
|
The size of the icon.
|
|
20
25
|
@ios
|