ripal-ui 1.0.6 → 1.0.7

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.
@@ -83,14 +83,19 @@ const Button: FC<ButtonProps> = ({
83
83
  }
84
84
  ]}
85
85
  >
86
- <Text
87
- {...textProps}
88
- color={accent === "primary" ? "#fff" : color}
89
- style={styles.text}
90
- weight='600SemiBold'
91
- >
92
- {children}
93
- </Text>
86
+ {
87
+ typeof children === "string" ?
88
+ <Text
89
+ {...textProps}
90
+ color={accent === "primary" ? "#fff" : color}
91
+ style={styles.text}
92
+ weight='600SemiBold'
93
+ >
94
+ {children}
95
+ </Text>
96
+ :
97
+ children
98
+ }
94
99
  </TouchableOpacity>
95
100
  );
96
101
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Pressable, PressableProps, StyleSheet, ViewStyle } from "react-native";
2
+ import { Pressable, PressableProps, StyleSheet, View, ViewStyle } from "react-native";
3
3
 
4
4
  interface InlineProps extends PressableProps {
5
5
  children: React.ReactNode;
@@ -18,7 +18,7 @@ const Inline: React.FC<InlineProps> = ({
18
18
  onPress,
19
19
  onLayout,
20
20
  }) => {
21
- return (
21
+ return onPress ? (
22
22
  <Pressable
23
23
  style={{
24
24
  flexDirection: 'row',
@@ -32,7 +32,19 @@ const Inline: React.FC<InlineProps> = ({
32
32
  >
33
33
  {children}
34
34
  </Pressable>
35
- );
35
+ ) :
36
+ <View
37
+ style={{
38
+ flexDirection: 'row',
39
+ alignItems,
40
+ justifyContent,
41
+ gap,
42
+ ...style,
43
+ }}
44
+ onLayout={onLayout}
45
+ >
46
+ {children}
47
+ </View>
36
48
  };
37
49
 
38
50
  export default Inline;
package/elements/Text.tsx CHANGED
@@ -39,8 +39,6 @@ const Text: FC<TextProps> = ({
39
39
  const [lang, setLang] = useState(config.appLangs.default);
40
40
 
41
41
  useEffect(() => {
42
- console.log('hehe');
43
-
44
42
  AsyncStorage.getItem('app_lang').then(appLang => {
45
43
  if (appLang != null) {
46
44
  console.log('setting to ', appLang);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ripal-ui",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A collection of React elements and components",
5
5
  "main": "index.js",
6
6
  "scripts": {