feature home

deskripsi:
- tampilan home
This commit is contained in:
2025-06-26 17:43:47 +08:00
parent f0e0ef4b8b
commit 3849e03a1a
17 changed files with 679 additions and 126 deletions

View File

@@ -5,6 +5,7 @@ import { Text, TouchableOpacity } from "react-native";
import buttonStyles from "./buttonStyles";
// Definisi props dengan TypeScript
interface ButtonProps {
onPress: () => void;
title?: string;
@@ -15,6 +16,17 @@ interface ButtonProps {
iconLeft?: React.ReactNode;
}
/**
* Props untuk ButtonCustom
* @param onPress: () => void
* @param title?: string
* @param backgroundColor?: string
* @param textColor?: string
* @param radius?: number
* @param disabled?: boolean
* @param iconLeft?: React.ReactNode
* @example iconLeft={<Icon name="arrow-right" size={20} color={MainColor.black}/>
*/
const ButtonCustom: React.FC<ButtonProps> = ({
onPress,
title = "Button",

View File

@@ -5,19 +5,23 @@ import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
interface ViewWrapperProps {
children: React.ReactNode;
withBackground?: boolean;
tabBarComponent?: React.ReactNode;
}
const ViewWrapper = ({
children,
withBackground = false,
tabBarComponent,
}: ViewWrapperProps) => {
const assetBackground = require("../../assets/images/main-background.png");
return (
<SafeAreaProvider>
<SafeAreaView
edges={[]}
edges={[
"bottom",
// "top",
]}
style={{
flex: 1,
// paddingTop: StatusBar.currentHeight,
@@ -36,6 +40,7 @@ const ViewWrapper = ({
<View style={Styles.container}>{children}</View>
)}
</ScrollView>
{tabBarComponent}
</SafeAreaView>
</SafeAreaProvider>
);