native-pytech 1.0.223 → 1.0.225

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,5 +1,5 @@
1
1
  import { memo, useMemo } from 'react';
2
- import { StyleSheet, Text } from 'react-native';
2
+ import { StyleSheet, Text, View } 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';
@@ -27,16 +27,21 @@ export default memo(({ text, color = 'default', type = 'small', icon, ionIconNam
27
27
  {text}
28
28
  </Text>);
29
29
  }, [text, typeSizes]);
30
- 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 }}>
30
+ return (<View style={[styles.view, { height: typeSizes.diameter, borderRadius: typeSizes.diameter }]}>
31
+ <LinearGradient style={[styles.view, styles.gradient, { height: typeSizes.diameter, borderRadius: typeSizes.diameter }]} colors={[colors[color].light, colors[color].dark]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}/>
31
32
  {textComponent ?? (icon ?? (ionIconName && <Ionicons name={ionIconName} size={iconSize} color={'white'}/>))}
32
- </LinearGradient>);
33
+ </View>);
33
34
  });
34
35
  const styles = StyleSheet.create({
35
- gradient: {
36
+ view: {
36
37
  aspectRatio: 1, // width will automatically match height
37
38
  justifyContent: 'center',
38
39
  alignItems: 'center'
39
40
  },
41
+ gradient: {
42
+ position: 'absolute',
43
+ transform: [{ rotate: '90deg' }],
44
+ },
40
45
  text: {
41
46
  color: 'white',
42
47
  fontWeight: 'bold',
@@ -88,7 +88,8 @@ const styles = StyleSheet.create({
88
88
  flexDirection: 'row',
89
89
  alignItems: 'center',
90
90
  justifyContent: 'center',
91
- gap: 10
91
+ gap: 10,
92
+ minHeight: 55.1,
92
93
  },
93
94
  izq: {
94
95
  marginRight: 'auto',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.223",
3
+ "version": "1.0.225",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",