native-pytech 1.0.205 → 1.0.206
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,3 +1,3 @@
|
|
|
1
1
|
import type Props from './types';
|
|
2
|
-
declare const _default: import("react").MemoExoticComponent<({ text, color, type, icon, ionIconName, }: Props) => import("react").JSX.Element>;
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<({ text, color, type, icon, ionIconName, sizeDiameter }: Props) => import("react").JSX.Element>;
|
|
3
3
|
export default _default;
|
|
@@ -3,8 +3,19 @@ import { StyleSheet, Text } from 'react-native';
|
|
|
3
3
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
4
4
|
import { Ionicons } from '@expo/vector-icons';
|
|
5
5
|
import colors, { sizes } from '../../constants';
|
|
6
|
-
export default memo(({ text, color = 'default', type = 'small', icon, ionIconName, }) => {
|
|
7
|
-
const typeSizes = useMemo(() =>
|
|
6
|
+
export default memo(({ text, color = 'default', type = 'small', icon, ionIconName, sizeDiameter }) => {
|
|
7
|
+
const typeSizes = useMemo(() => {
|
|
8
|
+
if (!sizeDiameter)
|
|
9
|
+
return sizes[type];
|
|
10
|
+
return {
|
|
11
|
+
diameter: sizeDiameter,
|
|
12
|
+
fontSize: {
|
|
13
|
+
1: sizeDiameter * 0.53,
|
|
14
|
+
2: sizeDiameter * 0.48,
|
|
15
|
+
3: sizeDiameter * 0.43
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}, [type]);
|
|
8
19
|
const iconSize = typeSizes.diameter * 0.5;
|
|
9
20
|
const textComponent = useMemo(() => {
|
|
10
21
|
const cantLetras = text?.length;
|