native-pytech 1.0.44 → 1.0.46
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<({ text, color, type, systemName }: Props) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ text, color, type, systemName, iconSize, }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -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 }) => {
|
|
6
|
+
export default memo(({ text, color, type = 'small', systemName, iconSize, }) => {
|
|
7
7
|
const typeSizes = useMemo(() => sizes[type], [type]);
|
|
8
8
|
const textComponent = useMemo(() => {
|
|
9
9
|
const cantLetras = text?.length;
|
|
@@ -16,7 +16,7 @@ export default memo(({ text, color, type = 'small', systemName }) => {
|
|
|
16
16
|
</Text>);
|
|
17
17
|
}, [text, typeSizes]);
|
|
18
18
|
return (<LinearGradient style={[styles.gradient, { height: typeSizes.diameter, borderRadius: typeSizes.diameter }]} colors={[colors[color].light, colors[color].dark]} start={{ x: 0, y: 0 }} end={{ x: 0, y: 1 }}>
|
|
19
|
-
{textComponent ?? (systemName && <Icon systemName={systemName}/>)}
|
|
19
|
+
{textComponent ?? (systemName && <Icon systemName={systemName} iconSize={iconSize}/>)}
|
|
20
20
|
</LinearGradient>);
|
|
21
21
|
});
|
|
22
22
|
const styles = StyleSheet.create({
|
|
@@ -10,7 +10,7 @@ import React, { memo, useMemo } from 'react';
|
|
|
10
10
|
export default memo(({ children, modifiers, disablePaddingTop, onRefresh, ...listProps }) => {
|
|
11
11
|
const _modifiers = useMemo(() => [
|
|
12
12
|
...(modifiers ?? []),
|
|
13
|
-
...(disablePaddingTop ? [padding({ top: -15 })]
|
|
13
|
+
...(disablePaddingTop ? [] : [padding({ top: -15 })]),
|
|
14
14
|
...(onRefresh ? [refreshable(onRefresh)] : []),
|
|
15
15
|
], [modifiers, disablePaddingTop, onRefresh]);
|
|
16
16
|
return (<List modifiers={_modifiers} {...listProps}>
|