feature home
deskripsi: - tampilan home
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user