@towsila/expo-ui-library 4.0.0 → 4.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towsila/expo-ui-library",
3
- "version": "4.0.0",
3
+ "version": "4.1.1",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -0,0 +1,57 @@
1
+ import { Ionicons } from "@expo/vector-icons";
2
+ import { View , Text, TouchableOpacity} from "react-native";
3
+ import { SvgProps } from "react-native-svg";
4
+ import { useAppTheme } from "../../context/ThemeContext";
5
+ import { useLanguage } from "../../context/LanguageContext";
6
+ import { Fonts, textSize } from "../../tokens/typography";
7
+
8
+ interface Props{
9
+ icon: React.ComponentType<SvgProps>,
10
+ label: string;
11
+ onNavigate:()=>void
12
+ }
13
+ export default function NavigationRow({icon: Icon, label, onNavigate}:Props){
14
+ const {colors} = useAppTheme();
15
+ const {isRTL} = useLanguage();
16
+ const arrow: keyof typeof Ionicons.glyphMap = isRTL
17
+ ? "chevron-back-outline"
18
+ : "chevron-forward-outline";
19
+ return(
20
+ <TouchableOpacity
21
+ onPress={onNavigate}
22
+ style={{
23
+ flexDirection: isRTL ? "row":"row-reverse",
24
+ justifyContent:"space-between",
25
+ alignItems:"center"
26
+ }}>
27
+ <View style={{
28
+ flexDirection: isRTL ? "row":"row-reverse",
29
+ gap: 20,
30
+ alignItems:"center"
31
+ }}>
32
+ <Icon width={22} height={22} color={colors.text.primary}/>
33
+ <Text style={{
34
+ fontFamily: Fonts.montserrat.semiBold,
35
+ fontSize: textSize.md,
36
+ color: colors.text.primary
37
+ }}
38
+ >
39
+ {label}
40
+ </Text>
41
+ </View>
42
+ <View
43
+ style={{
44
+ width: 24,
45
+ alignItems: "center",
46
+ flexShrink: 0,
47
+ }}
48
+ >
49
+ <Ionicons
50
+ name={arrow}
51
+ size={18}
52
+ color={colors.text.secondary}
53
+ />
54
+ </View>
55
+ </TouchableOpacity>
56
+ )
57
+ }
package/src/index.ts CHANGED
@@ -68,4 +68,5 @@ export {default as Toggle} from "./components/ui/toggle";
68
68
  export {default as BackIcon} from "./components/ui/backIcon";
69
69
  export {default as SuccessScreen} from "./components/screens/sucessScreen";
70
70
  export {default as AnimatedSuccessIcon} from "./components/ui/AnimatedSuccessIcon";
71
- export {ScrollWithIndicator} from "./components/ui/scrollIndicator"
71
+ export {ScrollWithIndicator} from "./components/ui/scrollIndicator"
72
+ export {default as NavigationRow} from "./components/ui/navigationCard";