profile not done
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import React from "react";
|
||||
import { StatusBar, StyleSheet, View } from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
type AppViewProps = {
|
||||
children: React.ReactNode;
|
||||
backgroundColor?: string;
|
||||
barStyle?: "default" | "light-content" | "dark-content";
|
||||
};
|
||||
|
||||
export default function AppView({
|
||||
children,
|
||||
backgroundColor = "#f5f5f5",
|
||||
barStyle = "dark-content",
|
||||
}: AppViewProps) {
|
||||
return (
|
||||
<SafeAreaView style={[styles.safeArea, { backgroundColor }]}>
|
||||
<StatusBar
|
||||
translucent={false}
|
||||
backgroundColor={backgroundColor}
|
||||
barStyle={barStyle}
|
||||
/>
|
||||
<View style={styles.container}>{children}</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
safeArea: {
|
||||
flex: 1,
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
paddingHorizontal: 16,
|
||||
paddingTop: 8,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
import React from "react";
|
||||
import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, ViewStyle } from "react-native";
|
||||
|
||||
type CustomButtonProps = {
|
||||
title: string;
|
||||
onPress: () => void;
|
||||
backgroundColor?: string;
|
||||
textColor?: string;
|
||||
loading?: boolean;
|
||||
style?: ViewStyle;
|
||||
};
|
||||
|
||||
export default function CustomButton({
|
||||
title,
|
||||
onPress,
|
||||
backgroundColor = "#6C63FF",
|
||||
textColor = "#fff",
|
||||
loading = false,
|
||||
style,
|
||||
}: CustomButtonProps) {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
style={[styles.button, { backgroundColor }, style]}
|
||||
onPress={onPress}
|
||||
disabled={loading}
|
||||
activeOpacity={0.8}
|
||||
>
|
||||
{loading ? (
|
||||
<ActivityIndicator color={textColor} />
|
||||
) : (
|
||||
<Text style={[styles.text, { color: textColor }]}>{title}</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
paddingVertical: 16,
|
||||
paddingHorizontal: 20,
|
||||
borderRadius: 12,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
marginVertical: 5,
|
||||
},
|
||||
text: {
|
||||
fontSize: 16,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user