feature
deskripsi: - tampilan edit profile - resourcing stack - fix text input & buttom
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
import React from "react";
|
||||
import { Text, TouchableOpacity } from "react-native";
|
||||
import buttonStyles from "./buttonCustomStyles";
|
||||
import { RADIUS_BUTTON } from "@/constants/constans-value";
|
||||
|
||||
// Definisi props dengan TypeScript
|
||||
|
||||
interface ButtonProps {
|
||||
onPress: () => void;
|
||||
children?: React.ReactNode;
|
||||
onPress?: () => void;
|
||||
title?: string;
|
||||
backgroundColor?: string;
|
||||
textColor?: string;
|
||||
@@ -28,6 +30,7 @@ interface ButtonProps {
|
||||
* @example iconLeft={<Icon name="arrow-right" size={20} color={MainColor.black}/>
|
||||
*/
|
||||
const ButtonCustom: React.FC<ButtonProps> = ({
|
||||
children,
|
||||
onPress,
|
||||
title = "Button",
|
||||
backgroundColor = "#007AFF",
|
||||
@@ -39,7 +42,7 @@ const ButtonCustom: React.FC<ButtonProps> = ({
|
||||
const styles = buttonStyles({
|
||||
backgroundColor,
|
||||
textColor,
|
||||
borderRadius: radius,
|
||||
borderRadius: RADIUS_BUTTON || radius,
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -51,7 +54,7 @@ const ButtonCustom: React.FC<ButtonProps> = ({
|
||||
>
|
||||
{/* Render icon jika tersedia */}
|
||||
{iconLeft && iconLeft}
|
||||
<Text style={styles.buttonText}>{title}</Text>
|
||||
<Text style={styles.buttonText}>{children}</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import StackCustom from "./StackCustom";
|
||||
|
||||
export { StackCustom };
|
||||
@@ -11,7 +11,7 @@ import { Text as RNText, StyleProp, StyleSheet, TextStyle } from "react-native";
|
||||
type TextAlign = "left" | "center" | "right";
|
||||
|
||||
interface TextCustomProps {
|
||||
children: string;
|
||||
children: string | React.ReactNode;
|
||||
style?: StyleProp<TextStyle>;
|
||||
bold?: boolean;
|
||||
semiBold?: boolean;
|
||||
|
||||
@@ -7,12 +7,14 @@ interface ViewWrapperProps {
|
||||
children: React.ReactNode;
|
||||
withBackground?: boolean;
|
||||
tabBarComponent?: React.ReactNode;
|
||||
bottomBarComponent?: React.ReactNode;
|
||||
}
|
||||
|
||||
const ViewWrapper = ({
|
||||
children,
|
||||
withBackground = false,
|
||||
tabBarComponent,
|
||||
bottomBarComponent,
|
||||
}: ViewWrapperProps) => {
|
||||
const assetBackground = require("../../assets/images/main-background.png");
|
||||
|
||||
@@ -42,10 +44,17 @@ const ViewWrapper = ({
|
||||
<View style={GStyles.container}>{children}</View>
|
||||
)}
|
||||
</ScrollView>
|
||||
{tabBarComponent}
|
||||
{tabBarComponent ? tabBarComponent : null}
|
||||
{bottomBarComponent ? (
|
||||
<View style={GStyles.bottomBar}>
|
||||
<View style={GStyles.bottomBarContainer}>
|
||||
{bottomBarComponent}
|
||||
</View>
|
||||
</View>
|
||||
) : null}
|
||||
</SafeAreaView>
|
||||
</>
|
||||
|
||||
|
||||
// <SafeAreaProvider>
|
||||
// <SafeAreaView
|
||||
// edges={[
|
||||
|
||||
@@ -19,6 +19,8 @@ import Grid from "./Grid/GridCustom";
|
||||
import BaseBox from "./Box/BaseBox";
|
||||
// Avatar
|
||||
import AvatarCustom from "./Avatar/AvatarCustom"
|
||||
// Stack
|
||||
import StackCustom from "./Stack/StackCustom";
|
||||
|
||||
export {
|
||||
AlertCustom,
|
||||
@@ -41,4 +43,6 @@ export {
|
||||
BaseBox,
|
||||
// Avatar
|
||||
AvatarCustom,
|
||||
// Stack
|
||||
StackCustom,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user