app-expo-cli 1.1.0 → 1.1.2
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/.github/workflows/npm-publish.yml +31 -0
- package/README.md +12 -2
- package/package.json +1 -1
- package/template/src/lib/DateTimePicker/DateTimePicker.tsx +0 -63
- package/template/src/lib/Empty/EmptyCard.tsx +0 -67
- package/template/src/lib/Error/GlobalErrorBoundary.tsx +0 -111
- package/template/src/lib/animate/AniImage.tsx +0 -32
- package/template/src/lib/backHeader/BackButton.tsx +0 -62
- package/template/src/lib/backHeader/BackWithCoponent.tsx +0 -112
- package/template/src/lib/backHeader/BackWithHeader.tsx +0 -46
- package/template/src/lib/backHeader/BackWithTitle.tsx +0 -53
- package/template/src/lib/buttons/IButton.tsx +0 -69
- package/template/src/lib/buttons/IwtButton.tsx +0 -199
- package/template/src/lib/buttons/Or.tsx +0 -27
- package/template/src/lib/buttons/SimpleButton.tsx +0 -45
- package/template/src/lib/buttons/TButton.tsx +0 -70
- package/template/src/lib/cards/Card.tsx +0 -175
- package/template/src/lib/cards/OptionSelect.tsx +0 -44
- package/template/src/lib/cards/SearchCard.tsx +0 -35
- package/template/src/lib/editor/TextEditor.tsx +0 -81
- package/template/src/lib/expend/ExpendComponent.tsx +0 -36
- package/template/src/lib/imageViewer/ImageViwer.tsx +0 -332
- package/template/src/lib/imageZoomer/ImageZoomer.tsx +0 -104
- package/template/src/lib/inputs/CheckBox.tsx +0 -86
- package/template/src/lib/inputs/InputText.tsx +0 -232
- package/template/src/lib/loader/GLoading.tsx +0 -26
- package/template/src/lib/loading/MLoading.tsx +0 -14
- package/template/src/lib/loading/SLoading.tsx +0 -14
- package/template/src/lib/modals/ActionModal.tsx +0 -97
- package/template/src/lib/modals/BottomModal.tsx +0 -224
- package/template/src/lib/modals/ConfrimationModal.tsx +0 -116
- package/template/src/lib/modals/DateModal.tsx +0 -152
- package/template/src/lib/modals/NormalModal.tsx +0 -73
- package/template/src/lib/modals/SideModal.tsx +0 -57
- package/template/src/lib/modals/Toaster.tsx +0 -256
- package/template/src/lib/payment/PaymentCardForD.tsx +0 -47
- package/template/src/lib/progressBar/ProgressBar.tsx +0 -64
- package/template/src/lib/tailwind.js +0 -9
- package/template/src/lib/ui/Avatar.tsx +0 -55
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Node.js Package Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main # Publish when pushing to the main branch
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-npm:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
# Step 1: Checkout the source code
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
# Step 2: Setup Node.js and configure NPM registry
|
|
17
|
+
- name: Setup Node.js
|
|
18
|
+
uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: '20'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
22
|
+
|
|
23
|
+
# Step 3: Install all dependencies
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm install
|
|
26
|
+
|
|
27
|
+
# Step 4: Publish to NPM with public access
|
|
28
|
+
- name: Publish to NPM
|
|
29
|
+
run: npm publish --access public
|
|
30
|
+
env:
|
|
31
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -66,6 +66,8 @@ my-awesome-app/
|
|
|
66
66
|
└── ... (other expo files)
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
---
|
|
70
|
+
|
|
69
71
|
### 📚 Dependencies Auto-Installed
|
|
70
72
|
|
|
71
73
|
আপনার প্রজেক্টের সাথে এই প্রয়োজনীয় প্যাকেজগুলো অটোমেটিক কনফিগার হয়ে যাবে:
|
|
@@ -82,6 +84,8 @@ my-awesome-app/
|
|
|
82
84
|
|
|
83
85
|
**- Features & Utilities: expo-image-picker ও react-native-otp-entry**
|
|
84
86
|
|
|
87
|
+
---
|
|
88
|
+
|
|
85
89
|
### 🤝 Contributing
|
|
86
90
|
|
|
87
91
|
আপনি যদি এই টেমপ্লেটে কোনো পরিবর্তন বা নতুন ফিচার যোগ করতে চান, তবে অবশ্যই একটি Pull Request ওপেন করবেন।
|
|
@@ -90,7 +94,9 @@ GitHub (CLI): https://github.com/arifbiswas/app-expo-cli
|
|
|
90
94
|
|
|
91
95
|
GitHub (Library): https://github.com/arifbiswas/lib
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### 👤 Author
|
|
94
100
|
|
|
95
101
|
Arif Biswas
|
|
96
102
|
|
|
@@ -100,7 +106,7 @@ GitHub: https://github.com/arifbiswas
|
|
|
100
106
|
|
|
101
107
|
NPM: https://www.npmjs.com/package/app-expo-cli
|
|
102
108
|
|
|
103
|
-
### 🌐 Social Links
|
|
109
|
+
<!-- ### 🌐 Social Links -->
|
|
104
110
|
|
|
105
111
|
<!-- আপনি চাইলে এখানে আরও সোশ্যাল লিংক যোগ করতে পারেন:
|
|
106
112
|
|
|
@@ -120,4 +126,8 @@ LinkedIn: https://linkedin.com/in/arifbiswas
|
|
|
120
126
|
|
|
121
127
|
Twitter (X): https://x.com/arifbiswas -->
|
|
122
128
|
|
|
129
|
+
---
|
|
130
|
+
|
|
123
131
|
© 2026 Arif Biswas. All rights reserved.
|
|
132
|
+
|
|
133
|
+
---
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import DatePicker, { DatePickerProps } from "react-native-date-picker";
|
|
2
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
|
-
|
|
4
|
-
import { IconCalendar } from "@/icons/icons";
|
|
5
|
-
import { PrimaryColor } from "../../utils/utils";
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { SvgXml } from "react-native-svg";
|
|
8
|
-
import tw from "../tailwind";
|
|
9
|
-
|
|
10
|
-
interface DateTimePickerProps {
|
|
11
|
-
getCurrentDate?: (value: string) => any;
|
|
12
|
-
dateProps?: DatePickerProps;
|
|
13
|
-
title: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const DateTimePicker = ({
|
|
17
|
-
dateProps,
|
|
18
|
-
getCurrentDate,
|
|
19
|
-
title,
|
|
20
|
-
}: DateTimePickerProps) => {
|
|
21
|
-
const [open, setOpen] = React.useState(false);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<View>
|
|
25
|
-
<View>
|
|
26
|
-
<TouchableOpacity
|
|
27
|
-
onPress={() => {
|
|
28
|
-
setOpen(true);
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<View
|
|
32
|
-
style={tw`bg-white h-12 px-2 rounded-md flex-row items-center justify-between`}
|
|
33
|
-
>
|
|
34
|
-
<Text style={tw`text-sm text-gray-500 font-DegularDisplayRegular`}>
|
|
35
|
-
{title}
|
|
36
|
-
</Text>
|
|
37
|
-
<SvgXml xml={IconCalendar} />
|
|
38
|
-
</View>
|
|
39
|
-
</TouchableOpacity>
|
|
40
|
-
</View>
|
|
41
|
-
<DatePicker
|
|
42
|
-
style={tw`border-0 h-12 rounded-lg bg-transparent`}
|
|
43
|
-
mode="time"
|
|
44
|
-
modal
|
|
45
|
-
theme="dark"
|
|
46
|
-
dividerColor={PrimaryColor}
|
|
47
|
-
buttonColor={PrimaryColor}
|
|
48
|
-
open={open}
|
|
49
|
-
date={new Date()}
|
|
50
|
-
onConfirm={(currentData: any) => {
|
|
51
|
-
if (currentData) {
|
|
52
|
-
getCurrentDate && getCurrentDate(currentData?.toISOString());
|
|
53
|
-
}
|
|
54
|
-
setOpen(false);
|
|
55
|
-
}}
|
|
56
|
-
onCancel={() => setOpen(false)}
|
|
57
|
-
{...dateProps}
|
|
58
|
-
/>
|
|
59
|
-
</View>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default DateTimePicker;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ActivityIndicator, Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { SvgXml } from "react-native-svg";
|
|
5
|
-
import tw from "../tailwind";
|
|
6
|
-
|
|
7
|
-
interface NoFoundCardProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
hight?: number;
|
|
11
|
-
isLoading?: boolean;
|
|
12
|
-
reload?: () => void;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const EmptyCard = ({
|
|
16
|
-
description,
|
|
17
|
-
title,
|
|
18
|
-
hight = 200,
|
|
19
|
-
isLoading,
|
|
20
|
-
reload,
|
|
21
|
-
}: NoFoundCardProps) => {
|
|
22
|
-
return (
|
|
23
|
-
<View>
|
|
24
|
-
<View
|
|
25
|
-
style={[
|
|
26
|
-
tw`flex-1 justify-center items-center gap-3 opacity-15`,
|
|
27
|
-
{
|
|
28
|
-
height: hight && hight,
|
|
29
|
-
},
|
|
30
|
-
]}
|
|
31
|
-
>
|
|
32
|
-
{isLoading ? (
|
|
33
|
-
<ActivityIndicator color={"white"} size={"large"} />
|
|
34
|
-
) : (
|
|
35
|
-
<>
|
|
36
|
-
<SvgXml
|
|
37
|
-
height={60}
|
|
38
|
-
width={60}
|
|
39
|
-
// opacity={0.2}
|
|
40
|
-
xml={`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 512.784 512.784" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M256.49 512.611c-39.223 0-76.087-8.051-109.57-23.929-9.98-4.733-14.234-16.66-9.501-26.641s16.661-14.234 26.641-9.501c182.603 84.249 373.961-104.925 287.358-288.361-10.496-24.22 23.859-40.738 36.143-17.138 81.565 167.692-45.06 367.114-231.071 365.57zM52.124 376.652c9.964-4.768 14.175-16.71 9.407-26.674C-25.292 167.823 166.08-25.438 348.923 61.684c9.98 4.732 21.906.477 26.638-9.503s.479-21.908-9.501-26.641C147.806-76.935-76.809 149.894 25.452 367.246c4.782 10.061 16.93 14.133 26.672 9.406zM34.632 506.753l472-472c7.811-7.811 7.811-20.474 0-28.284s-20.474-7.811-28.284 0l-472 472c-7.811 7.811-7.811 20.474 0 28.284 7.811 7.811 20.474 7.811 28.284 0z" fill="#FFF" opacity="1" data-original="#FFF" class=""></path></g></svg>
|
|
41
|
-
`}
|
|
42
|
-
/>
|
|
43
|
-
<Text
|
|
44
|
-
style={tw`text-white font-InterRegular text-base text-center`}
|
|
45
|
-
>
|
|
46
|
-
{title ? title : "Data not exists"}
|
|
47
|
-
</Text>
|
|
48
|
-
</>
|
|
49
|
-
)}
|
|
50
|
-
</View>
|
|
51
|
-
{reload && (
|
|
52
|
-
<TouchableOpacity
|
|
53
|
-
onPress={reload}
|
|
54
|
-
style={tw`absolute bottom-0 right-0 left-0`}
|
|
55
|
-
>
|
|
56
|
-
<Text
|
|
57
|
-
style={tw`text-primary font-InterRegular text-base text-center`}
|
|
58
|
-
>
|
|
59
|
-
Reload
|
|
60
|
-
</Text>
|
|
61
|
-
</TouchableOpacity>
|
|
62
|
-
)}
|
|
63
|
-
</View>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default EmptyCard;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import tw from "../tailwind";
|
|
5
|
-
|
|
6
|
-
export default class GlobalErrorBoundary extends React.Component {
|
|
7
|
-
constructor(props = {}) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.state = { hasError: false, error: null } as any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static getDerivedStateFromError(error = null) {
|
|
13
|
-
return { hasError: true, error };
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
componentDidCatch(error, info) {
|
|
17
|
-
console.log("GLOBAL ERROR:", error, info);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
resetError = () => {
|
|
21
|
-
this.setState({ hasError: false, error: null });
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
render() {
|
|
25
|
-
if (this.state.hasError) {
|
|
26
|
-
return (
|
|
27
|
-
<View
|
|
28
|
-
style={{
|
|
29
|
-
flex: 1,
|
|
30
|
-
justifyContent: "center",
|
|
31
|
-
alignItems: "center",
|
|
32
|
-
padding: 24,
|
|
33
|
-
backgroundColor: tw.color("base"),
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{/* Error Illustration */}
|
|
37
|
-
<View
|
|
38
|
-
style={{
|
|
39
|
-
width: 120,
|
|
40
|
-
height: 120,
|
|
41
|
-
borderRadius: 60,
|
|
42
|
-
backgroundColor: "#FFE5E0",
|
|
43
|
-
justifyContent: "center",
|
|
44
|
-
alignItems: "center",
|
|
45
|
-
marginBottom: 25,
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
<Text style={{ fontSize: 55 }}>⚠️</Text>
|
|
49
|
-
</View>
|
|
50
|
-
|
|
51
|
-
{/* Title */}
|
|
52
|
-
<Text
|
|
53
|
-
style={{
|
|
54
|
-
fontSize: 22,
|
|
55
|
-
fontWeight: "700",
|
|
56
|
-
color: "#333",
|
|
57
|
-
textAlign: "center",
|
|
58
|
-
marginBottom: 10,
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
Something went wrong
|
|
62
|
-
</Text>
|
|
63
|
-
|
|
64
|
-
{/* Subtitle */}
|
|
65
|
-
<Text
|
|
66
|
-
style={{
|
|
67
|
-
fontSize: 15,
|
|
68
|
-
color: "#666",
|
|
69
|
-
textAlign: "center",
|
|
70
|
-
marginBottom: 30,
|
|
71
|
-
lineHeight: 20,
|
|
72
|
-
width: "85%",
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
An unexpected error occurred. Please try again or restart the app.
|
|
76
|
-
</Text>
|
|
77
|
-
|
|
78
|
-
{/* Button */}
|
|
79
|
-
<TouchableOpacity
|
|
80
|
-
onPress={this.resetError}
|
|
81
|
-
style={{
|
|
82
|
-
backgroundColor: "#ED6237",
|
|
83
|
-
paddingVertical: 12,
|
|
84
|
-
paddingHorizontal: 28,
|
|
85
|
-
borderRadius: 10,
|
|
86
|
-
shadowColor: "#000",
|
|
87
|
-
shadowOpacity: 0.1,
|
|
88
|
-
shadowRadius: 4,
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
<Text
|
|
92
|
-
style={{
|
|
93
|
-
color: "#fff",
|
|
94
|
-
fontSize: 16,
|
|
95
|
-
fontWeight: "600",
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
Try Again
|
|
99
|
-
</Text>
|
|
100
|
-
</TouchableOpacity>
|
|
101
|
-
</View>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return this.props.children;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export const GlobalErrorBoundaryProvider = ({ children }: any) => {
|
|
110
|
-
return <GlobalErrorBoundary>{children}</GlobalErrorBoundary>;
|
|
111
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ActivityIndicator } from "react-native";
|
|
2
|
-
import { AnimatedImage } from "react-native-ui-lib";
|
|
3
|
-
import { AnimatedImageProps } from "react-native-ui-lib/src/components/animatedImage";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import tw from "../tailwind";
|
|
6
|
-
|
|
7
|
-
interface IAniImage extends AnimatedImageProps {
|
|
8
|
-
source: { uri: string };
|
|
9
|
-
containerStyle?: any;
|
|
10
|
-
imageStyle?: any;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const AniImage = ({
|
|
14
|
-
source,
|
|
15
|
-
containerStyle,
|
|
16
|
-
imageStyle,
|
|
17
|
-
...props
|
|
18
|
-
}: IAniImage) => {
|
|
19
|
-
return (
|
|
20
|
-
<AnimatedImage
|
|
21
|
-
containerStyle={[tw` items-center rounded-md`, containerStyle]}
|
|
22
|
-
errorSource={source}
|
|
23
|
-
animationDuration={500}
|
|
24
|
-
style={[tw` rounded-md`, imageStyle]}
|
|
25
|
-
loader={<ActivityIndicator color="white" size={"small"} />}
|
|
26
|
-
source={source}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default AniImage;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { SvgXml } from "react-native-svg";
|
|
5
|
-
import tw from "../tailwind";
|
|
6
|
-
|
|
7
|
-
interface BackButtonProps {
|
|
8
|
-
onPress?: () => void;
|
|
9
|
-
titleStyle?: any;
|
|
10
|
-
title?: any;
|
|
11
|
-
containerStyle?: any;
|
|
12
|
-
buttonStyle?: any;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const BackButton = ({
|
|
16
|
-
onPress,
|
|
17
|
-
containerStyle,
|
|
18
|
-
titleStyle,
|
|
19
|
-
title,
|
|
20
|
-
buttonStyle,
|
|
21
|
-
}: BackButtonProps) => {
|
|
22
|
-
return (
|
|
23
|
-
<TouchableOpacity
|
|
24
|
-
activeOpacity={0.5}
|
|
25
|
-
onPress={onPress}
|
|
26
|
-
style={[
|
|
27
|
-
tw` flex-row px-4 pt-4 pb-3 items-center gap-2 `,
|
|
28
|
-
containerStyle,
|
|
29
|
-
]}
|
|
30
|
-
>
|
|
31
|
-
<TouchableOpacity
|
|
32
|
-
onPress={onPress}
|
|
33
|
-
style={tw`flex-row items-center gap-3 `}
|
|
34
|
-
>
|
|
35
|
-
<View
|
|
36
|
-
style={[
|
|
37
|
-
tw`bg-[#3D3D3D] w-12 h-12 justify-center items-center rounded-full `,
|
|
38
|
-
buttonStyle,
|
|
39
|
-
]}
|
|
40
|
-
>
|
|
41
|
-
<SvgXml
|
|
42
|
-
xml={`<svg width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
43
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.477124 9.99984L9.69575 18L12 16.0003L3.9335 9L12 1.99969L9.69575 0L0.477124 8.00016C0.171621 8.26536 0 8.625 0 9C0 9.375 0.171621 9.73464 0.477124 9.99984Z" fill="white"/>
|
|
44
|
-
</svg>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`}
|
|
49
|
-
/>
|
|
50
|
-
</View>
|
|
51
|
-
<Text
|
|
52
|
-
numberOfLines={1}
|
|
53
|
-
style={[tw`text-white font-InterSemiBold text-base`, titleStyle]}
|
|
54
|
-
>
|
|
55
|
-
{title ? title : null}
|
|
56
|
-
</Text>
|
|
57
|
-
</TouchableOpacity>
|
|
58
|
-
</TouchableOpacity>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default BackButton;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { Platform, Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { SvgXml } from "react-native-svg";
|
|
5
|
-
import tw from "../tailwind";
|
|
6
|
-
|
|
7
|
-
interface BackButtonProps {
|
|
8
|
-
onPress?: () => void;
|
|
9
|
-
titleStyle?: any;
|
|
10
|
-
title?: any;
|
|
11
|
-
containerStyle?: any;
|
|
12
|
-
ComponentBtn?: React.ReactNode;
|
|
13
|
-
offBack?: boolean;
|
|
14
|
-
togather?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const BackWithComponent = ({
|
|
18
|
-
onPress,
|
|
19
|
-
containerStyle,
|
|
20
|
-
titleStyle,
|
|
21
|
-
ComponentBtn,
|
|
22
|
-
title,
|
|
23
|
-
offBack,
|
|
24
|
-
togather,
|
|
25
|
-
}: BackButtonProps) => {
|
|
26
|
-
return (
|
|
27
|
-
<View
|
|
28
|
-
style={[
|
|
29
|
-
tw`flex-row items-center justify-between gap-2 `,
|
|
30
|
-
containerStyle,
|
|
31
|
-
{
|
|
32
|
-
paddingTop: Platform.OS === "android" ? 5 : 0,
|
|
33
|
-
// paddingBottom: 5,
|
|
34
|
-
},
|
|
35
|
-
]}
|
|
36
|
-
>
|
|
37
|
-
{!togather ? (
|
|
38
|
-
<>
|
|
39
|
-
{!offBack ? (
|
|
40
|
-
<TouchableOpacity
|
|
41
|
-
onPress={onPress}
|
|
42
|
-
style={tw`flex-row items-center gap-3 `}
|
|
43
|
-
>
|
|
44
|
-
<View
|
|
45
|
-
style={tw`bg-[#3D3D3D] w-12 h-12 justify-center items-center rounded-full`}
|
|
46
|
-
>
|
|
47
|
-
<SvgXml
|
|
48
|
-
xml={`<svg width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.477124 9.99984L9.69575 18L12 16.0003L3.9335 9L12 1.99969L9.69575 0L0.477124 8.00016C0.171621 8.26536 0 8.625 0 9C0 9.375 0.171621 9.73464 0.477124 9.99984Z" fill="white"/>
|
|
50
|
-
</svg>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`}
|
|
55
|
-
/>
|
|
56
|
-
</View>
|
|
57
|
-
</TouchableOpacity>
|
|
58
|
-
) : (
|
|
59
|
-
title && <View style={tw`w-10 h-10`} />
|
|
60
|
-
)}
|
|
61
|
-
<Text
|
|
62
|
-
numberOfLines={1}
|
|
63
|
-
style={[tw`text-white font-InterBold text-base`, titleStyle]}
|
|
64
|
-
>
|
|
65
|
-
{title}
|
|
66
|
-
</Text>
|
|
67
|
-
</>
|
|
68
|
-
) : (
|
|
69
|
-
<>
|
|
70
|
-
{!offBack ? (
|
|
71
|
-
<TouchableOpacity
|
|
72
|
-
activeOpacity={0.5}
|
|
73
|
-
onPress={onPress}
|
|
74
|
-
style={[tw` flex-row pl-4 items-center gap-2 `, containerStyle]}
|
|
75
|
-
>
|
|
76
|
-
<TouchableOpacity
|
|
77
|
-
onPress={onPress}
|
|
78
|
-
style={tw`flex-row items-center gap-3 `}
|
|
79
|
-
>
|
|
80
|
-
<View
|
|
81
|
-
style={tw`bg-[#3D3D3D] w-12 h-12 justify-center items-center rounded-full`}
|
|
82
|
-
>
|
|
83
|
-
<SvgXml
|
|
84
|
-
xml={`<svg width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.477124 9.99984L9.69575 18L12 16.0003L3.9335 9L12 1.99969L9.69575 0L0.477124 8.00016C0.171621 8.26536 0 8.625 0 9C0 9.375 0.171621 9.73464 0.477124 9.99984Z" fill="white"/>
|
|
86
|
-
</svg>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
`}
|
|
91
|
-
/>
|
|
92
|
-
</View>
|
|
93
|
-
<Text
|
|
94
|
-
numberOfLines={1}
|
|
95
|
-
style={[tw`text-white font-InterBold text-base`, titleStyle]}
|
|
96
|
-
>
|
|
97
|
-
{title ? title : null}
|
|
98
|
-
</Text>
|
|
99
|
-
</TouchableOpacity>
|
|
100
|
-
</TouchableOpacity>
|
|
101
|
-
) : (
|
|
102
|
-
<View style={tw`w-10 h-10`} />
|
|
103
|
-
)}
|
|
104
|
-
</>
|
|
105
|
-
)}
|
|
106
|
-
|
|
107
|
-
{ComponentBtn ? ComponentBtn : null}
|
|
108
|
-
</View>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export default BackWithComponent;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Platform, Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import { IconRightArrayGray } from "../../icons/icons";
|
|
4
|
-
import { NavigProps } from "../../interfaces/NaviProps";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { SvgXml } from "react-native-svg";
|
|
7
|
-
import tw from "../tailwind";
|
|
8
|
-
|
|
9
|
-
interface IBackWithHeader extends NavigProps<null> {
|
|
10
|
-
svgIcon?: any;
|
|
11
|
-
title?: string;
|
|
12
|
-
titleStyle?: any;
|
|
13
|
-
containerStyle?: any;
|
|
14
|
-
offBack?: boolean;
|
|
15
|
-
}
|
|
16
|
-
const BackWithHeader = ({
|
|
17
|
-
navigation,
|
|
18
|
-
svgIcon,
|
|
19
|
-
title,
|
|
20
|
-
titleStyle,
|
|
21
|
-
containerStyle,
|
|
22
|
-
offBack,
|
|
23
|
-
}: IBackWithHeader) => {
|
|
24
|
-
return (
|
|
25
|
-
<View
|
|
26
|
-
style={[
|
|
27
|
-
tw`px-[4%] ${
|
|
28
|
-
Platform.OS === "android" ? "pt-5" : "pt-0"
|
|
29
|
-
} pb-4 flex-row gap-3 items-center`,
|
|
30
|
-
containerStyle,
|
|
31
|
-
]}
|
|
32
|
-
>
|
|
33
|
-
{!offBack && (
|
|
34
|
-
<TouchableOpacity onPress={() => navigation?.goBack()}>
|
|
35
|
-
<SvgXml xml={svgIcon || IconRightArrayGray} />
|
|
36
|
-
</TouchableOpacity>
|
|
37
|
-
)}
|
|
38
|
-
|
|
39
|
-
<Text style={[tw`text-base text-white200 font-RobotoBlack `, titleStyle]}>
|
|
40
|
-
{title}
|
|
41
|
-
</Text>
|
|
42
|
-
</View>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default React.memo(BackWithHeader);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { SvgXml } from "react-native-svg";
|
|
5
|
-
import tw from "../tailwind";
|
|
6
|
-
|
|
7
|
-
interface BackWithTitleProps {
|
|
8
|
-
onPress?: () => void;
|
|
9
|
-
title: string;
|
|
10
|
-
titleStyle?: any;
|
|
11
|
-
containerStyle?: any;
|
|
12
|
-
backOff?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const BackWithTitle = ({
|
|
16
|
-
onPress,
|
|
17
|
-
title,
|
|
18
|
-
containerStyle,
|
|
19
|
-
titleStyle,
|
|
20
|
-
backOff,
|
|
21
|
-
}: BackWithTitleProps) => {
|
|
22
|
-
return (
|
|
23
|
-
<TouchableOpacity
|
|
24
|
-
activeOpacity={0.5}
|
|
25
|
-
onPress={onPress}
|
|
26
|
-
style={[tw`flex-row items-center gap-3 p-[4%]`, containerStyle]}
|
|
27
|
-
>
|
|
28
|
-
<View
|
|
29
|
-
style={tw`bg-[#3D3D3D] w-12 h-12 justify-center items-center rounded-full`}
|
|
30
|
-
>
|
|
31
|
-
<SvgXml
|
|
32
|
-
xml={`<svg width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
33
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.477124 9.99984L9.69575 18L12 16.0003L3.9335 9L12 1.99969L9.69575 0L0.477124 8.00016C0.171621 8.26536 0 8.625 0 9C0 9.375 0.171621 9.73464 0.477124 9.99984Z" fill="white"/>
|
|
34
|
-
</svg>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`}
|
|
39
|
-
/>
|
|
40
|
-
</View>
|
|
41
|
-
<Text
|
|
42
|
-
style={[
|
|
43
|
-
tw`text-white50 font-DegularDisplaySemibold text-xl `,
|
|
44
|
-
titleStyle,
|
|
45
|
-
]}
|
|
46
|
-
>
|
|
47
|
-
{title}
|
|
48
|
-
</Text>
|
|
49
|
-
</TouchableOpacity>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default React.memo(BackWithTitle);
|